Welcome to skforecast
About The Project¶
Skforecast is a Python library that eases using scikit-learn regressors as single and multi-step forecasters. It also works with any regressor compatible with the scikit-learn API (LightGBM, XGBoost, CatBoost, ...).
Why use skforecast?
The fields of statistics and machine learning have developed many excellent regression algorithms that can be useful for forecasting, but applying them effectively to time series analysis can still be a challenge. To address this issue, the skforecast library provides a comprehensive set of tools for training, validation and prediction in a variety of scenarios commonly encountered when working with time series. The library is built using the widely used scikit-learn API, making it easy to integrate into existing workflows. With skforecast, users have access to a wide range of functionalities such as feature engineering, model selection, hyperparameter tuning and many others. This allows users to focus on the essential aspects of their projects and leave the intricacies of time series analysis to skforecast. In addition, skforecast is developed according to the following priorities:
- Fast and robust prototyping.
- Validation and backtesting methods to have a realistic assessment of model performance.
- Models must be deployed in production.
- Models must be interpretable.
Share Your Thoughts with Us
Thank you for choosing skforecast! We value your suggestions, bug reports and recommendations as they help us identify areas for improvement and ensure that skforecast meets the needs of the community. Please consider sharing your experiences, reporting bugs, making suggestions or even contributing to the codebase on GitHub. Together, let's make time series forecasting more accessible and accurate for everyone.
Installation¶
The default installation of skforecast only installs hard dependencies.
1 |
|
Specific version:
1 |
|
Latest (unstable):
1 |
|
Install the full version (all dependencies):
1 |
|
Install optional dependencies:
1 |
|
1 |
|
Dependencies¶
- Python >= 3.8
Hard dependencies¶
- numpy>=1.20, <1.25
- pandas>=1.2, <2.1
- tqdm>=4.57.0, <4.65
- scikit-learn>=1.0, <1.3
- optuna>=2.10.0, <3.2
- joblib>=1.1.0, <1.3.0
Optional dependencies¶
- matplotlib>=3.3, <3.8
- seaborn>=0.11, <0.13
- statsmodels>=0.12, <0.14
- pmdarima>=2.0, <2.1
Forecasters¶
A Forecaster object in the skforecast library is a comprehensive container that provides essential functionality and methods for training a forecasting model and generating predictions for future points in time.
The skforecast library offers a variety of forecaster types, each tailored to specific requirements such as single or multiple time series, direct or recursive strategies, or custom predictors. Regardless of the specific forecaster type, all instances share the same API.
Forecaster | Single series | Multiple series | Recursive strategy | Direct strategy | Probabilistic prediction | Exogenous features | Custom features |
---|---|---|---|---|---|---|---|
ForecasterAutoreg | ✔️ | ✔️ | ✔️ | ✔️ | |||
ForecasterAutoregCustom | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ||
ForecasterAutoregDirect | ✔️ | ✔️ | ✔️ | ✔️ | |||
ForecasterMultiSeries | ✔️ | ✔️ | ✔️ | ✔️ | |||
ForecasterMultiSeriesCustom | ✔️ | ✔️ | ✔️ | ✔️ | ✔️ | ||
ForecasterMultiVariate | ✔️ | ✔️ | ✔️ | ✔️ | |||
ForecasterSarimax | ✔️ | ✔️ | ✔️ | ✔️ |
Features¶
- Create Forecasters from any regressor that follows the scikit-learn API
- Include exogenous variables as predictors
- Include custom predictors (rolling mean, rolling variance ...)
- Multiple backtesting methods for model validation
- Grid search, random search and Bayesian search to find optimal lags (predictors) and best hyperparameters
- Prediction interval estimated by bootstrapping and quantile regression
- Include custom metrics for model validation and grid search
- Get predictor importance
- Forecaster in production
Examples and tutorials¶
English¶
Skforecast: time series forecasting with Python and Scikit-learn
Forecasting electricity demand with Python
Forecasting web traffic with machine learning and Python
Forecasting with gradient boosting: XGBoost, LightGBM and CatBoost
Bitcoin price prediction with Python
Prediction intervals in forecasting models
Reducing the influence of Covid-19 on time series forecasting models
Forecasting time series with missing values
Intermittent demand forecasting
Español¶
Skforecast: forecasting series temporales con Python y Scikit-learn
Forecasting de la demanda eléctrica
Forecasting de las visitas a una página web
Forecasting con gradient boosting: XGBoost, LightGBM y CatBoost
Predicción del precio de Bitcoin con Python
Intervalos de predicción en modelos de forecasting
Predicción demanda intermitente
How to contribute¶
For more information on how to contribute to skforecast, see our Contribution Guide.
Donating¶
If you found skforecast useful, you can support us with a donation. Your contribution will help to continue developing and improving this project. Many thanks!
Citation¶
If you use this software, please cite it using the following metadata.
APA:
1 |
|
BibTeX:
1 2 3 4 5 6 7 8 |
|
View the citation file.