Forecasting time series with scikitlearn regressors. It also works with any regressor compatible with the scikit-learn API (pipelines, CatBoost, LightGBM, XGBoost, Ranger...).
Project description
skforecast
Time series forecasting with scikit-learn regressors.
Skforecast is a python library that eases using scikit-learn regressors as multi-step forecasters. It also works with any regressor compatible with the scikit-learn API (pipelines, CatBoost, LightGBM, XGBoost, Ranger...).
Documentation: https://joaquinamatrodrigo.github.io/skforecast/
Installation
pip install skforecast
Specific version:
pip install skforecast==0.4.1
Latest (unstable):
pip install git+https://github.com/JoaquinAmatRodrigo/skforecast#master
The most common error when importing the library is:
'cannot import name 'mean_absolute_percentage_error' from 'sklearn.metrics'
.
This is because the scikit-learn installation is lower than 0.24. Try to upgrade scikit-learn with
pip3 install -U scikit-learn
Dependencies
- numpy>=1.20, <=1.22
- pandas>=1.2, <=1.4
- tqdm>=4.57.0, <=4.62
- scikit-learn>=1.0
- statsmodels>=0.12, <=0.13
Features
- Create recursive autoregressive forecasters from any regressor that follows the scikit-learn API
- Create multi-output autoregressive forecasters from any regressor that follows the scikit-learn API
- Grid search to find optimal hyperparameters
- Grid search to find optimal lags (predictors)
- Include exogenous variables as predictors
- Include custom predictors (rolling mean, rolling variance ...)
- Multiple backtesting methods for model validation
- Include custom metrics for model validation
- Prediction interval estimated by bootstrapping
- Get predictor importance
Documentation
The documentation for the latest release is at skforecast docs .
Recent improvements are highlighted in the release notes.
Examples and tutorials
English
-
Skforecast: time series forecasting with Python and Scikit-learn
-
Forecasting time series with gradient boosting: Skforecast, XGBoost, LightGBM and CatBoost
Español
-
Skforecast: forecasting series temporales con Python y Scikit-learn
-
Forecasting series temporales con gradient boosting: Skforecast, XGBoost, LightGBM y CatBoost
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!
Licence
joaquinAmatRodrigo/skforecast is licensed under the MIT License, a short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.
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.4.3.tar.gz
.
File metadata
- Download URL: skforecast-0.4.3.tar.gz
- Upload date:
- Size: 11.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 56c5e743e0ec6d983401e88b56705b63408ca0e021058018df7a3965010d6808 |
|
MD5 | a123aa886ca8eb3d83df8cb59299d0a5 |
|
BLAKE2b-256 | 47c8cd2a342e9258f9bd5abde0e65304c7ddd98a0f0852459ecf3877de8557ce |
File details
Details for the file skforecast-0.4.3-py2.py3-none-any.whl
.
File metadata
- Download URL: skforecast-0.4.3-py2.py3-none-any.whl
- Upload date:
- Size: 87.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a998573802d8df321461e972360af817faa480760947a0aa44d372c7ba6ff919 |
|
MD5 | 640c0ca47fedf115aab880a58cb9f87c |
|
BLAKE2b-256 | bab4c48b758169124355c00d4dc870b7feea9d47777cc570e847940915a99d3d |