HoltSmoothingWrapper

class hcrystalball.wrappers.HoltSmoothingWrapper(endog=None, exponential=False, damped_trend=False, initialization_method=None, initial_level=None, initial_trend=None, name='HoltSmoothing', fit_params=None, clip_predictions_lower=None, clip_predictions_upper=None)[source]

Bases: hcrystalball.wrappers._statsmodels.BaseStatsmodelsForecastingWrapper

Wrapper for Holt (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 see statsmodels.tsa.holtwinters.Holt.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

pandas.DataFrame

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.

Parameters

**params (dict) – Estimator parameters.

Returns

self – Estimator instance.

Return type

object