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)[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.
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.
- Parameters
deep (bool, default=True) – If True, will return the parameters for this estimator and contained subobjects that are estimators.
- Returns
params – Parameter names mapped to their values.
- Return type
mapping of string to any
-
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 pipelines). The latter have parameters of the form
<component>__<parameter>
so that it’s possible to update each component of a nested object.