Model wrappers for 3rd party libraries.
To be used with Fold.
Explore the docs »
Name | Link | Supports Online updating |
Wrapper Name & Import Location |
|
---|---|---|---|---|
StatsForecast | GitHub | ❌ | WrapStatsForecastfrom fold_wrappers import WrapStatsForecast |
|
NeuralForecast (beta) | GitHub | ❌ | WrapNeuralForecastfrom fold_wrappers import WrapNeuralForecast |
|
XGBoost | GitHub | ✅ | WrapXGBfrom fold_wrappers import WrapXGB |
|
LightGBM | GitHub | ✅ | WrapLGBMfrom fold_wrappers import WrapLGBM |
|
SKTime (beta) | GitHub | ✅ | WrapSktimefrom fold_wrappers import WrapSktime |
|
Statsmodels | GitHub | ✅ | WrapStatsModelsfrom fold_wrappers import WrapStatsModels |
|
Prophet | GitHub | ✅ | WrapProphetfrom fold_wrappers import WrapProphet |
|
Sklearn (natively available in fold ) |
GitHub | 🟡 (some) |
Sklearn doesn't need to be wrapped, just pass in the models. |
-
Prerequisites:
python >= 3.7
andpip
-
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>]"
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
)
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!
Join our Discord for live discussion!
Submit an issue or reach out to us on info at dream-faster.ai for any inquiries.
Fold-wrappers is under the MIT Licence, but fold
is not. Read more