We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StatsForecast currently lacks a method to save fitted models to disk.
Currently pickling the models that I access with the following snippet:
fitted_models = sf.fit().fitted_
This would be helpful in use cases where we want to call predict() separately on a pre-trained model.
predict()
The text was updated successfully, but these errors were encountered:
You could use joblib to store model artifacts. Here is an example
import joblib from statsforecast import StatsForecast from statsforecast.models import MSTL, SeasonalNaive season_length = 24 sf = StatsForecast( df=df, # assume you have a dataframe loaded freq="H", n_jobs=-1, models=[ MSTL( season_length=[ season_length, season_length * 90, ], ), ], fallback_model=SeasonalNaive(season_length=season_length), ) sf.fit() # store StatsForecast predictor in joblib model_filename = "model/mstl.joblib" joblib.dump(sf, model_filename) # load from file model = joblib.load(model_filename) forecast = model.predict(h=30, level=[90])
Sorry, something went wrong.
I believe this was fixed by #667
No branches or pull requests
Description
StatsForecast currently lacks a method to save fitted models to disk.
Currently pickling the models that I access with the following snippet:
Use case
This would be helpful in use cases where we want to call
predict()
separately on a pre-trained model.The text was updated successfully, but these errors were encountered: