BATSWrapper¶
-
class
hcrystalball.wrappers.
BATSWrapper
(use_box_cox=None, box_cox_bounds=0, 1, use_trend=None, use_damped_trend=None, seasonal_periods=None, use_arma_errors=True, show_warnings=True, n_jobs=None, context=None, name='BATS', fit_params=None, conf_int=False, conf_int_level=0.95, clip_predictions_lower=None, clip_predictions_upper=None)[source]¶ Bases:
hcrystalball.wrappers._tbats.BaseTBATSWrapper
Wrapper for BATS model
https://github.com/intive-DataScience/tbats
Brings BATS to sklearn time-series compatible interface and puts fit parameters to initialization stage.
- Parameters
name (str) – Name of the model instance, used also as column name for returned prediction.
conf_int (bool) – Whether confidence intervals should be also outputed.
conf_int_level (float) – Confidence level of returned confidence interval
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.
Notes
Fitting the model might take significant time. You might consider advices from the author https://medium.com/p/cf3e4e80cf48/responses/show
Methods Summary
fit
(X, y)Fit the model.
get_params
([deep])Get parameters for this estimator.
predict
(X)Transform data to tbats required format and run the predictions.
set_params
(**params)Set the parameters of this estimator.
Methods Documentation
-
fit
(X, y)¶ Fit the model.
- Parameters
X (pandas.DataFrame) – Input features.
y (array_like, (1d)) – Target vector.
- Returns
- 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 tbats required format and run the 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.