Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

dream-faster/fold-wrappers

Repository files navigation

Statsforecast Tests StatsModels Tests XGBoost Tests Sktime Tests Prophet Test Discord Community Calendly Booking


Logo

fold-wrappers
(/fold wrappers/)

Model wrappers for 3rd party libraries.
To be used with Fold.


Explore the docs »


Available models

Name Link Supports
Online
updating
Wrapper Name
& Import Location
StatsDorecast Logo StatsForecast GitHub WrapStatsForecast
from fold_wrappers import WrapStatsForecast
NeuralForecast Logo NeuralForecast (beta) GitHub WrapNeuralForecast
from fold_wrappers import WrapNeuralForecast
XGBoost Logo XGBoost GitHub WrapXGB
from fold_wrappers import WrapXGB
LightGBM Logo LightGBM GitHub WrapLGBM
from fold_wrappers import WrapLGBM
Sktime Logo SKTime (beta) GitHub WrapSktime
from fold_wrappers import WrapSktime
Statsmodels Logo Statsmodels GitHub WrapStatsModels
from fold_wrappers import WrapStatsModels
Prophet Logo Prophet GitHub WrapProphet
from fold_wrappers import WrapProphet
Scikit-Learn Logo Sklearn
(natively available in fold)
GitHub 🟡
(some)
Sklearn doesn't need to be wrapped,
just pass in the models.

Installation

  • Prerequisites: python >= 3.7 and pip

  • Install from pypi:

    pip install fold-wrappers
    
  • Depending on what model you'd like to wrap, you can either install the library directly or run

    pip install "fold-wrappers[<your_library_name>]"
    

Quickstart

You can quickly train your chosen models and get predictions by running:

  from fold import ExpandingWindowSplitter, train_evaluate
  from fold.utils.dataset import get_preprocessed_dataset
  from statsforecast.models import ARIMA

  from fold_wrappers import WrapStatsForecast

  X, y = get_preprocessed_dataset(
      "weather/historical_hourly_la", target_col="temperature", shorten=1000
  )
  model = WrapStatsForecast(
      model_class=ARIMA, # Pass in the class
      init_args={"order": (1, 0, 0)}, # and the arguments to pass in at `init()`
      online_mode=False, # Enable online updates where available
  )
  splitter = ExpandingWindowSplitter(initial_train_window=0.2, step=50)

  scorecard, predictions, trained_pipeline = train_evaluate(model, X, y, splitter)

You can also wrap a model that you have initiate first:

wrapped_model = WrapStatsForecast.from_model(
    ARIMA(order=(1, 0, 0)),
    online_mode=False # Enable online updates where available
)

Our Open-core Time Series Toolkit

Krisi Fold Fold/Models Fold/Wrapper

If you want to try them out, we'd love to hear about your use case and help, please book a free 30-min call with us!

Contribution

Join our Discord for live discussion!

Submit an issue or reach out to us on info at dream-faster.ai for any inquiries.

Licence & Usage

Fold-wrappers is under the MIT Licence, but fold is not. Read more