Functions
ML::HoltWinters Namespace Reference

Functions

void buffer_size (int n, int batch_size, int frequency, int *start_leveltrend_len, int *start_season_len, int *components_len, int *error_len, int *leveltrend_coef_shift, int *season_coef_shift)
 
void fit (const raft::handle_t &handle, int n, int batch_size, int frequency, int start_periods, ML::SeasonalType seasonal, float epsilon, float *data, float *level_d, float *trend_d, float *season_d, float *error_d)
 
void fit (const raft::handle_t &handle, int n, int batch_size, int frequency, int start_periods, ML::SeasonalType seasonal, double epsilon, double *data, double *level_d, double *trend_d, double *season_d, double *error_d)
 
void forecast (const raft::handle_t &handle, int n, int batch_size, int frequency, int h, ML::SeasonalType seasonal, float *level_d, float *trend_d, float *season_d, float *forecast_d)
 
void forecast (const raft::handle_t &handle, int n, int batch_size, int frequency, int h, ML::SeasonalType seasonal, double *level_d, double *trend_d, double *season_d, double *forecast_d)
 

Function Documentation

◆ buffer_size()

void ML::HoltWinters::buffer_size ( int  n,
int  batch_size,
int  frequency,
int *  start_leveltrend_len,
int *  start_season_len,
int *  components_len,
int *  error_len,
int *  leveltrend_coef_shift,
int *  season_coef_shift 
)

Provides buffer sizes for HoltWinters algorithm

Parameters
[in]nn_samples in time-series
[in]batch_sizenumber of time-series in X
[in]frequencynumber of periods in a season of the time-series
[out]start_leveltrend_lenpointer which will hold the length of the level/trend array buffers
[out]start_season_lenpointer which will hold the length of the seasonal array buffer
[out]components_lenpointer which will hold the length of all three components
[out]error_lenpointer which will hold the length of the SSE Error
[out]leveltrend_coef_shiftpointer which will hold the offset to level/trend arrays
[out]season_coef_shiftpointer which will hold the offset to season array

◆ fit() [1/2]

void ML::HoltWinters::fit ( const raft::handle_t &  handle,
int  n,
int  batch_size,
int  frequency,
int  start_periods,
ML::SeasonalType  seasonal,
double  epsilon,
double *  data,
double *  level_d,
double *  trend_d,
double *  season_d,
double *  error_d 
)

◆ fit() [2/2]

void ML::HoltWinters::fit ( const raft::handle_t &  handle,
int  n,
int  batch_size,
int  frequency,
int  start_periods,
ML::SeasonalType  seasonal,
float  epsilon,
float *  data,
float *  level_d,
float *  trend_d,
float *  season_d,
float *  error_d 
)

Fits a HoltWinters model

Parameters
[in]handlecuml handle to use across the algorithm
[in]nn_samples in time-series
[in]batch_sizenumber of time-series in X
[in]frequencynumber of periods in a season of the time-series
[in]start_periodsnumber of seasons to be used for seasonal seed values
[in]seasonaltype of seasonal component (ADDITIVE or MULTIPLICATIVE)
[in]epsilonthe error tolerance value for optimization
[in]datadevice pointer to the data to fit on
[out]level_ddevice pointer to array which will hold level components
[out]trend_ddevice pointer to array which will hold trend components
[out]season_ddevice pointer to array which will hold season components
[out]error_ddevice pointer to array which will hold training SSE error

◆ forecast() [1/2]

void ML::HoltWinters::forecast ( const raft::handle_t &  handle,
int  n,
int  batch_size,
int  frequency,
int  h,
ML::SeasonalType  seasonal,
double *  level_d,
double *  trend_d,
double *  season_d,
double *  forecast_d 
)

◆ forecast() [2/2]

void ML::HoltWinters::forecast ( const raft::handle_t &  handle,
int  n,
int  batch_size,
int  frequency,
int  h,
ML::SeasonalType  seasonal,
float *  level_d,
float *  trend_d,
float *  season_d,
float *  forecast_d 
)

Forecasts future points from fitted HoltWinters model

Parameters
[in]handlecuml handle to use across the algorithm
[in]nn_samples in time-series
[in]batch_sizenumber of time-series in X
[in]frequencynumber of periods in a season of the time-series
[in]hnumber of future points to predict in the time-series
[in]seasonaltype of seasonal component (ADDITIVE or MULTIPLICATIVE)
[out]level_ddevice pointer to array which holds level components
[out]trend_ddevice pointer to array which holds trend components
[out]season_ddevice pointer to array which holds season components
[out]forecast_ddevice pointer to array which will hold the forecast points