Readme

Scalecast

Scalecast Logo

About

Scalecast helps you forecast time series. It is especially good in the following use cases:

  • Series need dynamic transformations to extract signals

  • Series have missing values

  • Need to establish proof-of-concept experimentations with model validation

  • Academic research

  • Working in internal production and sandbox environments

Here is how to initiate its main object:

from scalecast.Forecaster import Forecaster

f = Forecaster(
    y = array_of_values,
    current_dates = array_of_dates,
    future_dates=fcst_horizon_length,
    test_length = 0, # do you want to test all models? if so, on how many or what percent of observations?
    cis = False, # evaluate conformal confidence intervals for all models?
    metrics = ['rmse','mape','mae','r2'], # what metrics to evaluate over the validation/test sets?
)

Uniform ML modeling (with models from a diverse set of libraries, including scikit-learn, statsmodels, and tensorflow), reporting, and data visualizations are offered through the Forecaster and MVForecaster interfaces. Data storage and processing then becomes easy as all applicable data, predictions, and many derived metrics are contained in a few objects with much customization available through different modules. Feature requests and issue reporting are welcome! Don’t forget to leave a star!⭐

Documentation

Installation

Required Installations

  • UV recommended

  • Only the base package is needed to get started:

    • pip install --upgrade scalecast

    • uv pip install --upgrade scalecast (recommended)

Optional Installations

  • shap: feature importance (known issue with Python 3.11+)

  • tf: tensorflow for rnn/lstm models (for MAC, you may need to run uv pip install tensorflow-macos tensorflow-metal)

  • darts: theta

  • greykite: silverkite model

  • prophet: prophet model

  • tbats: tbats

  • lgbm: lightgbm

Install these by using

uv pip install "scalecast[list_optional_dependencies]"

For example, install tensorflow and darts using:

uv pip install "scalecast[tf,darts]"

Please note that the optional dependencies may not be tested before new releases.

Papers that use scalecast

Udemy Course

Scalecast: Machine Learning & Deep Learning

Blog posts and notebooks

Forecasting with Different Model Types

Transforming and Reverting

Confidence Intervals

Dynamic Validation

Model Input Selection

Scaled Forecasting on Many Series

Transfer Learning

Contributing

How to cite scalecast

@misc{scalecast,
  title = {{scalecast}},
  author = {Michael Keith},
  year = {2024},
  version = {<your version>},
  url = {https://scalecast.readthedocs.io/en/latest/},
}