Welcome to ThymeBoost’s documentation!

Quick Start

https://github.com/tblume1992/ThymeBoost

Trend Models

ARIMA

Smoothers

EWM

class ThymeBoost.trend_models.ewm_trend.EwmModel

Bases: TrendBaseModel

The ewm method utilizes a Pandas ewm method: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.ewm.html. Fitting this with a ‘local’ fit_type parameter is not advised.

fit(y, **kwargs)

Fit the trend component in the boosting loop for a ewm model using the ‘ewm_alpha’ parameter.

Parameters:
  • time_series (np.ndarray) – DESCRIPTION.

  • **kwargs – The key ‘ewm_alpha’ is passed to this method from the ThymeBoost fit method.

Return type:

Fitted array.

model = 'ewm'
predict(forecast_horizon, model_params)

Linear

LOESS

class ThymeBoost.trend_models.loess_trend.LoessModel

Bases: TrendBaseModel

fit(y, **kwargs)

Fit the trend component in the boosting loop for a ewm model using alpha.

Parameters:
  • time_series (TYPE) – DESCRIPTION.

  • **kwargs (TYPE) – DESCRIPTION.

Return type:

None.

model = 'loess'
predict(forecast_horizon, model_params)

Mean

class ThymeBoost.trend_models.mean_trend.MeanModel

Bases: TrendBaseModel

fit(y, **kwargs)

Fit the trend component in the boosting loop for a mean model.

Parameters:
  • time_series (TYPE) – DESCRIPTION.

  • **kwargs (TYPE) – DESCRIPTION.

Return type:

None.

model = 'mean'
predict(forecast_horizon, model_params)

Median

class ThymeBoost.trend_models.median_trend.MedianModel

Bases: TrendBaseModel

fit(y, **kwargs)

Fit the trend component in the boosting loop for a mean model.

Parameters:
  • time_series (TYPE) – DESCRIPTION.

  • **kwargs (TYPE) – DESCRIPTION.

Return type:

None.

model = 'median'
predict(forecast_horizon, model_params)

RANSAC

Seasonality Models

Classic

class ThymeBoost.seasonality_models.classic_seasonality.ClassicSeasonalityModel(seasonal_period, normalize_seasonality, seasonality_weights)

Bases: SeasonalityBaseModel

Seasonality for naive decomposition method.

fit(y, **kwargs)

Fit the seasonal component for naive method in the boosting loop.

Parameters:
  • y (TYPE) – DESCRIPTION.

  • **kwargs (TYPE) – DESCRIPTION.

Return type:

None.

model = 'classic'
predict(forecast_horizon, model_params)

Fourier

class ThymeBoost.seasonality_models.fourier_seasonality.FourierSeasonalityModel(seasonal_period, normalize_seasonality, seasonality_weights)

Bases: SeasonalityBaseModel

Seasonality for naive decomposition method.

fit(y, **kwargs)

Fit the seasonal component for fourier basis function method in the boosting loop.

Parameters:
  • y (TYPE) – DESCRIPTION.

  • **kwargs (TYPE) – DESCRIPTION.

Return type:

None.

get_fourier_series(t, fourier_order)
handle_seasonal_weights(y)
model = 'fourier'
predict(forecast_horizon, model_params)

Exogenous Models

Decision Tree

GLM

OLS

Utilities

ThymeBoost.utils.plotting module

ThymeBoost.utils.plotting.plot_components(fitted_df, predicted_df, figsize)

Simple plot of components for convenience

ThymeBoost.utils.plotting.plot_optimization(fitted_df, opt_predictions, opt_type, figsize)

Simple plot of optimization results for convenience

ThymeBoost.utils.plotting.plot_results(fitted_df, predicted_df, figsize)

Simple plot of results for convenience

ThymeBoost.utils.trend_dampen module

ThymeBoost.utils.trend_dampen.trend_dampen(damp_fact, trend)

Indices and tables