Skip to main content

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

Maintenance Lifecycle Python Licence Downloads PyPI

skforecast

logo-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

Español

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!

paypal

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skforecast-0.4.3.tar.gz (11.7 MB view hashes)

Uploaded Source

Built Distribution

skforecast-0.4.3-py2.py3-none-any.whl (87.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page