antoinecarme/pyaf
PyAF is an Open Source Python library for Automatic Time Series Forecasting built on top of popular pydata modules.
What it solves
PyAF tackles the problem of predicting future values of a time series (a signal) without requiring a human expert to manually choose models or tune parameters. It automates the entire forecasting workflow: from reading data, to building and comparing many possible models, to outputting a forecast with confidence intervals. This is useful for anyone who needs reliable forecasts quickly, without deep knowledge of time-series analysis.
How it works
PyAF works as a competition among many candidate models. It takes a pandas data-frame with time and signal columns, splits the signal into estimation (80%) and validation (20%) parts, and then tries a large set of signal transformations and linear decompositions. Each transformed signal is broken down into trend, periodic, and autoregressive (AR) components. All possible combinations of these components are estimated, and the best performing combination (measured on the validation part) is chosen to produce the final forecast. PyAF can also incorporate exogenous variables (other time series) and hierarchical structures, and it infers the time frequency automatically from the data. The result is returned as a pandas data-frame with forecast values and prediction intervals.
Who it's for
PyAF is for Python users who need automatic forecasting without deep expertise in time-series modeling. It is built on standard data-science libraries (NumPy, SciPy, Pandas, scikit-learn) and is suitable for quick prototyping or integrating forecasts into larger data pipelines. It also offers advanced options for users who want to customize the process, such as enabling extra transformations or using a slow mode that explores all possible models.
Highlights
- Fully automated model selection: tries many transformations and decompositions and picks the best.
- Supports a wide range of time frequencies, including irregular timestamps and fake numeric dates.
- Can improve forecasts using exogenous variables (any type) and hierarchical forecasting (bottom-up, top-down, middle-out, optimal combinations).
- Provides prediction/confidence intervals for all forecasts.
- Includes benchmarking against standard forecasting competitions (M1, M2, M3, NN3, NN5).
- Offers a simple API (train and forecast) and a basic Flask web service for remote use.
Related
- Project
- Project
- Project
- Project