This release is a pre-release and may not be stable for production use.
What is Yohou?
Yohou is a time series forecasting framework built on top of Scikit-Learn's ecosystem. It provides a unified interface for building, extending, and comparing any forecasting model, from sklearn-native reductions to statistical models or deep learning integrations and hyperparameter optimization workflows. All models share a consistent API with native DataFrame support, Scikit-Learn-based compositions, and first-class cross-validation.
What are the features of Yohou?
- Polars-native: All data flows use
polars.DataFramewith a mandatory"time"column. No pandas required. - Sklearn-compatible: Standard
fit/predictAPI with a consistent interface across all forecaster types. - Reduction forecasting: Wrap any Scikit-Learn regressor (
Ridge,XGBRegressor, ...) and Yohou handles windowing, tabularization, and recursive prediction viaPointReductionForecaster,IntervalReductionForecaster, andClassProbaReductionForecaster. - Point, interval, and class-probability forecasting: From naive baselines to conformal prediction intervals (
SplitConformalForecaster) and calibrated class-probability distributions. - Panel data: Prefix columns with
group__and all forecasters, transformers, and metrics operate across groups automatically. UseColumnForecasterorLocalPanelForecasterfor per-group models. - Incremental observation: Call
observe()to feed new data,rewind()to roll back state, andobserve_predict()to fast-forward and forecast in one step without retraining. - Stateful transformers: All transformers implement fit/observe/rewind and participate fully in incremental forecasting pipelines, enabling correct state management across training and deployment.
- Composable pipelines: Chain trend, seasonality, and residual forecasters with
DecompositionPipeline, or build feature pipelines withFeaturePipeline,FeatureUnion, andColumnTransformer. - Cross-validation and model selection: Temporal splitters (
ExpandingWindowSplitter,SlidingWindowSplitter) andGridSearchCV/RandomizedSearchCVdesigned for time series with no data leakage. - Metrics: Point, interval, and class-probability scorers with stepwise, vintagewise, componentwise, and groupwise aggregation.
How to install Yohou?
Install the Yohou package using pip:
pip install yohou
or using uv:
uv pip install yohou
or using conda:
conda install -c conda-forge yohou
or using mamba:
mamba install -c conda-forge yohou
or alternatively, add yohou to your requirements.txt or pyproject.toml file.
How to get started with Yohou?
1. Load data and split
Yohou datasets are fetched from Monash/Zenodo and return a Bunch with a .frame attribute (a Polars DataFrame with a "time" column).
from yohou.datasets import fetch_sunspot
bunch = fetch_sunspot()
y = bunch.frame
y_train, y_test = y[:-30], y[-30:]
2. Fit a forecaster
Wrap an sklearn regressor in a PointReductionForecaster with preprocessing pipelines.
from sklearn.linear_model import Ridge
from yohou.compose import FeaturePipeline
from yohou.point import PointReductionForecaster
from yohou.preprocessing import LagTransformer
from yohou.stationarity import SeasonalDifferencing
forecaster = PointReductionForecaster(
estimator=Ridge(alpha=10),
target_transformer=FeaturePipeline([
("diff", SeasonalDifferencing(seasonality=27)),
]),
actual_transformer=FeaturePipeline([
("lag", LagTransformer(lag=[1, 2, 3, 27])),
]),
)
forecaster.fit(y_train, forecasting_horizon=len(y_test))
3. Predict and evaluate
After fitting, call predict and score against the held-out data.
from yohou.metrics import MeanAbsoluteError
from yohou.plotting import plot_forecast
y_pred = forecaster.predict(forecasting_horizon=len(y_test))
scorer = MeanAbsoluteError()
scorer.fit(y_train)
scorer.score(y_test, y_pred)
plot_forecast(y_test, y_pred, y_train=y_train)
How do I use Yohou?
Full documentation is available at https://yohou.readthedocs.io/.
Interactive examples are available in the examples/ directory:
- Online: https://yohou.readthedocs.io/en/latest/pages/examples/
- Locally: Run
marimo edit examples/quickstart.pyto open an interactive notebook
Can I contribute?
We welcome contributions, feedback, and questions:
- Report issues or request features: GitHub Issues
- Join the discussion: GitHub Discussions
- Contributing Guide: CONTRIBUTING.md
If you are interested in becoming a maintainer or taking a more active role, please reach out to the maintainers at .
Where can I learn more?
Here are the main Yohou resources:
- Full documentation: https://yohou.readthedocs.io/
- Interactive Examples: https://yohou.readthedocs.io/en/latest/pages/examples/
For questions and discussions, you can also open a discussion.
License
This project is licensed under the terms of the Apache-2.0 License.
How do I cite Yohou?
If you use Yohou in work you publish, please cite it:
Guillaume Tauzin. Yohou: A time series forecasting package based on Scikit-Learn and Polars. https://github.com/stateful-y/yohou
Or in BibTeX:
@software{yohou,
author = "Guillaume Tauzin",
title = "{Yohou: A time series forecasting package based on Scikit-Learn and Polars}",
url = "https://github.com/stateful-y/yohou",
license = "Apache-2.0"
}
Reference managers can read CITATION.cff directly. To cite a specific version, see the citation page.
Acknowledgements
We would like to thank Evolta Technologies for their support to the project.
This project is maintained by stateful-y, an ML consultancy specializing in time series data science & engineering. If you're interested in collaborating or learning more about our services, please visit our website.
Metadata
Release files for yohou 0.1.0a13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| yohou-0.1.0a13.tar.gz | 2.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| yohou-0.1.0a13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.9 MB
Release files / yohou-0.1.0a13.tar.gz
| Download URL | yohou-0.1.0a13.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
622333cba411e5351ea30a4d55cb1e5a4b65fc847f025af0d957083fedd2bbeb
|
|
BLAKE2b-256 checksum How to use checksums |
f09c340d4ae6fb62a7ac56598d0b63dc42aeb4a379a00d7d7d53387b6bd31865
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / yohou-0.1.0a13-py3-none-any.whl
| Download URL | yohou-0.1.0a13-py3-none-any.whl |
|---|---|
| Size | 779.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f2ba95a5e062594d7543df38cd5ede8cbdcadcbc380fd6957207874b69fd6ba1
|
|
BLAKE2b-256 checksum How to use checksums |
b53dc7af764673e5ec23e63271babde1a8513f42857a4b047cad4852182b80b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency log