ExponentialSmoothingWrapper¶
- class hcrystalball.wrappers.ExponentialSmoothingWrapper(endog=None, trend=None, damped_trend=False, seasonal=None, seasonal_periods=None, initialization_method=None, initial_level=None, initial_trend=None, initial_seasonal=None, use_boxcox=None, bounds=None, dates=None, freq=None, missing='none', name='ExponentialSmoothing', fit_params=None, clip_predictions_lower=None, clip_predictions_upper=None, hcb_verbose=True)[source]¶
Bases:
hcrystalball.wrappers._statsmodels.BaseStatsmodelsForecastingWrapper
Wrapper for
ExponentialSmoothing
(see other parameters there)- Parameters
name (str) – Name of the model instance, used also as column name for returned prediction
fit_params (dict) – Parameters passed to
fit
method of model. For more details seestatsmodels.tsa.holtwinters.ExponentialSmoothing.fit
clip_predictions_lower (float) – Minimal value allowed for predictions - predictions will be clipped to this value.
clip_predictions_upper (float) – Maximum value allowed for predictions - predictions will be clipped to this value.
hcb_verbose (bool) – Whtether to keep (True) or suppress (False) messages to stdout and stderr from the wrapper and 3rd party libraries during fit and predict
Methods Summary
fit
(X, y)Transform data to
statsmodels.tsa.api
required format and fit the model.get_params
([deep])Get parameters for this estimator.
predict
(X)Transform data to
statsmodels.tsa.api
required format and provide predictions.set_params
(**params)Set the parameters of this estimator.
Methods Documentation
- fit(X, y)¶
Transform data to
statsmodels.tsa.api
required format and fit the model.- Parameters
X (pandas.DataFrame) – Input features.
y (array_like, (1d)) – Target vector.
- Returns
Fitted model
- Return type
self
- get_params(deep=True)¶
Get parameters for this estimator.
- predict(X)¶
Transform data to
statsmodels.tsa.api
required format and provide predictions.- Parameters
X (pandas.DataFrame) – Input features.
- Returns
Prediction stored in column with name being the
name
of the wrapper.- Return type
- set_params(**params)¶
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline
). The latter have parameters of the form<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters
**params (dict) – Estimator parameters.
- Returns
self – Estimator instance.
- Return type
estimator instance