TBATSWrapper¶
- class hcrystalball.wrappers.TBATSWrapper(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, multiprocessing_start_method='spawn', context=None, name='TBATS', fit_params=None, conf_int=False, conf_int_level=0.95, clip_predictions_lower=None, clip_predictions_upper=None, hcb_verbose=True)[source]¶
Bases:
hcrystalball.wrappers._tbats.BaseTBATSWrapper
Wrapper for TBATS model
https://github.com/intive-DataScience/tbats
Brings TBATS 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.
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
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.
- 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
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