train_xgb: Generates a classification xgboost trainings model.

Description Usage Arguments Value Examples

Description

This is a function to generate a xgboost classification model for the 1000 time series from the tstaxonomyr R package. The best fitted xgboost model is identified based on the k-fold cv_nfold cross-validation and the number of rounds n_round. The linear method 'xgbTree' and non-linear method 'xgbLinear' are both fitted and afterwards the one with the lower MAPE is taken and returned. As input is only required the n_round, cv_nfold and tune_length with a number between 1 and 100. Also, for ts_taxonomy only 'v1' for the basic taxonomy or 'v2' for the ligther feature selected taxonomy of the tstaxonomyr R package are allowed. Otherwise the function returns an error message.

Usage

1
2
train_xgb(n_round = 10, cv_nfold = 10, tune_length = 10,
  ts_taxonomy = "v1")

Arguments

n_round

Number of cross-validation rounds.

cv_nfold

Number of folds of cross-validation.

tune_length

Number of model tuning intervals.

ts_taxonomy

Either 'v1' or 'v2'. v1 uses the default time series taxonomy and v2 the feature selected ts taxonomy of the tstaxonomyr package.

Value

The best fitted xgb classification model.

Examples

1
fitted_model <- train_xgb()

mowomoyela/tsfcmethodr documentation built on May 15, 2019, 4:47 p.m.