Skip to main content

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

Python PyPI codecov Build status Maintenance License Downloads

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.3

Latest (unstable):

pip install git+https://github.com/JoaquinAmatRodrigo/skforecast#master

Dependencies

  • numpy>=1.20, <=1.23
  • pandas>=1.2, <=1.4
  • tqdm>=4.57.0, <=4.64
  • scikit-learn>=1.0, <=1.1.2
  • statsmodels>=0.12, <=0.13.2
  • matplotlib>=3.3, <=3.5
  • seaborn==0.11.2
  • optuna==2.10.0
  • scikit-optimize==0.9.0
  • joblib>=1.1.0, <=1.2.0

Features

  • Create recursive autoregressive forecasters from any regressor that follows the scikit-learn API
  • Create direct autoregressive forecasters from any regressor that follows the scikit-learn API
  • Create multi-series autoregressive 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
  • Include custom metrics for model validation and grid search
  • Prediction interval estimated by bootstrapping and quantile regression
  • Get predictor importance
  • Forecaster in production

What is new in skforecast 0.5.1?

  • Random search and bayesian search (using optuna or skopt) for hyperparameter optimization. Try random_search_forecaster() and bayesian_search_forecaster().
  • ForecasterAutoregMultiOutput has been renamed to ForecasterAutoregDirect.
  • Modeling multiple time series simultaneously. Try ForecasterAutoregMultiSeries and the new functions available in model_selection_multiseries.
  • Allow different transformations for each predictor (lags and exogenous).
  • Multiple metrics in backtesting_forecaster, grid_search_forecaster, random_search_forecaster, bayesian_search_forecaster and backtesting_forecaster_multiseries.
  • Bug fixes and performance improvements.

Visit changelog to view all notable changes.

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

Citation

If you use this software, please cite it using the following metadata.

APA:

Amat Rodrigo, J., & Escobar Ortiz, J. skforecast (Version 0.5.1) [Computer software]

BibTeX:

@software{skforecast,
author = {Amat Rodrigo, Joaquin and Escobar Ortiz, Javier},
license = {MIT},
month = {10},
title = {{skforecast}},
version = {0.5.1},
year = {2022}
}

View citation file.

License

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.5.1.tar.gz (37.0 MB view details)

Uploaded Source

Built Distribution

skforecast-0.5.1-py2.py3-none-any.whl (169.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file skforecast-0.5.1.tar.gz.

File metadata

  • Download URL: skforecast-0.5.1.tar.gz
  • Upload date:
  • Size: 37.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for skforecast-0.5.1.tar.gz
Algorithm Hash digest
SHA256 81477253f072cc7ba22c829a86fa0ce5cf2d190de3d7c44d8134e5e9b8fa29bb
MD5 9336202f014dadd9acfdc9fbf8e9166d
BLAKE2b-256 89d3d91f87d873e1d280bfadc7134aa9244a268269da3201289df4b6742f817f

See more details on using hashes here.

File details

Details for the file skforecast-0.5.1-py2.py3-none-any.whl.

File metadata

  • Download URL: skforecast-0.5.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 169.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for skforecast-0.5.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c7b19126683b55e087b57f0ed5a091c66a702f92b4561a9f9e9ae7b960cc2539
MD5 db3e1b573246686e288bd9586453cdaa
BLAKE2b-256 1aa29c510fc4ba65fce39cbe116896e14971d246ff4256055b0f0ac7942e34a0

See more details on using hashes here.

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