Forecasting time series with scikit-learn regressors. It also works with any regressor compatible with the scikit-learn API (pipelines, CatBoost, LightGBM, XGBoost, Ranger...).
Project description
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. :zap:
- Validation and backtesting methods to have a realistic assessment of model performance. :mag:
- Models must be deployed in production. :hammer:
- Models must be interpretable. :crystal_ball:
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.
Documentation
For detailed information on how to use and leverage the full potential of skforecast please refer to the comprehensive documentation available at:
https://skforecast.org :books:
Installation
The default installation of skforecast only installs hard dependencies.
pip install skforecast
Specific version:
pip install skforecast==0.10.1
Latest (unstable):
pip install git+https://github.com/JoaquinAmatRodrigo/skforecast#master
Install the full version (all dependencies):
pip install skforecast[full]
Install optional dependencies:
pip install skforecast[sarimax]
pip install skforecast[plotting]
Dependencies
- Python >= 3.8
Hard dependencies
- numpy>=1.20, <1.26
- pandas>=1.2, <2.1
- tqdm>=4.57.0, <4.66
- scikit-learn>=1.0, <1.4
- optuna>=2.10.0, <3.3
- joblib>=1.1.0, <1.4
Optional dependencies
- matplotlib>=3.3, <3.8
- seaborn>=0.11, <0.13
- statsmodels>=0.12, <0.15
- pmdarima>=2.0, <2.1
What is new in skforecast 0.10?
Visit the release notes to view all notable changes.
- New
Sarimax.Sarimax
model. A wrapper ofstatsmodels.SARIMAX
that follows the scikit-learn API and can be used with theForecasterSarimax
. - Added
skforecast.preprocessing.TimeSeriesDifferentiator
to preprocess time series by differentiating or integrating them (reverse differentiation). - Added
differentiation
argument toForecasterAutoreg
andForecasterAutoregCustom
to model the n-order differentiated time series using the new skforecast preprocessorTimeSeriesDifferentiator
. - Bug fixes and performance improvements.
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 | Time series differentiation | Exogenous features | Custom features |
---|---|---|---|---|---|---|---|---|
ForecasterAutoreg | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |||
ForecasterAutoregCustom | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ||
ForecasterAutoregDirect | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ||||
ForecasterMultiSeries | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ||||
ForecasterMultiSeriesCustom | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | |||
ForecasterMultiVariate | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | ||||
ForecasterSarimax | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: |
Main User Guides
-
Dependent multi-series forecasting (Multivariate forecasting)
-
Hyperparameter tuning and lags selection of forecasting models
Examples and tutorials
English
-
Skforecast: time series forecasting with Python and Scikit-learn
-
Forecasting with gradient boosting: skforecast, XGBoost, LightGBM and CatBoost
-
Reducing the influence of Covid-19 on time series forecasting models
Español
-
Skforecast: forecasting series temporales con Python y Scikit-learn
-
Forecasting con gradient boosting: skforecast, XGBoost, LightGBM y CatBoost
-
Modelar series temporales con tendencia utilizando modelos de árboles
How to contribute
Primarily, skforecast development consists of adding and creating new Forecasters, new validation strategies, or improving the performance of the current code. However, there are many other ways to contribute:
- Submit a bug report or feature request on GitHub Issues.
- Contribute a Jupyter notebook to our examples.
- Write unit or integration tests for our project.
- Answer questions on our issues, Stack Overflow, and elsewhere.
- Translate our documentation into another language.
- Write a blog post, tweet, or share our project with others.
For more information on how to contribute to skforecast, see our Contribution Guide.
Citation
If you use this software, please cite it using the following metadata.
APA:
Amat Rodrigo, J., & Escobar Ortiz, J. skforecast (Version 0.10.1) [Computer software]
BibTeX:
@software{skforecast,
author = {Amat Rodrigo, Joaquin and Escobar Ortiz, Javier},
license = {BSD 3-Clause License},
month = {9},
title = {{skforecast}},
version = {0.10.1},
year = {2023}
}
View the citation file.
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!
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file skforecast-0.10.1.tar.gz
.
File metadata
- Download URL: skforecast-0.10.1.tar.gz
- Upload date:
- Size: 309.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2390c0ccb05598a19060d95e8a38e8667e576f2dc7d9a64a9315e115057c4598 |
|
MD5 | ec0a0f7caf7c789247c3067821e04bed |
|
BLAKE2b-256 | 23370932eac6b968620567d7b34fa27957858cc33ebc82e1652f2e18f5463dfb |
File details
Details for the file skforecast-0.10.1-py3-none-any.whl
.
File metadata
- Download URL: skforecast-0.10.1-py3-none-any.whl
- Upload date:
- Size: 397.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e0f72c37da94af93185b48f870e8b8cbcbdff653a5e4be37e425c32a9f887f9 |
|
MD5 | 54787608d099f15e6939bd5ab14c5c78 |
|
BLAKE2b-256 | 7f87da64dcc2afed93fd2f922fafd65712685861d2d65d9753bfc6e7fbbb95d0 |