gbm_baseline: Gradient boosting machine baseline model function.

Description Usage Arguments Value

View source: R/gbm_baseline.R

Description

gbm_baseline This function build a baseline model using gradient boosting machine algorithm.

Usage

1
2
3
4
5
gbm_baseline(train_path, pred_path = NULL, days_off_path = NULL,
  k_folds = 5, variables = c("Temp", "tow"),
  ncores = parallel::detectCores(logical = F), cv_blocks = "days",
  iter = (2:12) * 25, depth = c(3:7), lr = c(0.05, 0.1),
  subsample = c(0.5))

Arguments

train_path

The path of the file from which the training data are to be read.

pred_path

The path of the file from which the prediction data are to be read.

days_off_path

The path of the file from which the date data of days off (e.g., holidays) are to be read.

k_folds

An integer that corresponds to the number of CV folds.

variables

A vector that contains the names of the variables that will be considered by the function as input variables.

ncores

Number of threads used for the parallelization of the cross validation.

cv_blocks

type of blocks for the cross validation; Default is "none", which correspond to the standard k-fold cross validation technique.

iter

The search grid combination of the number of iterations.

depth

The search grid combination of the maximum depths.

lr

The search grid combination of the learning rates.

subsample.

Value

a gbm_baseline object, which alist with the following components:

gbm_model

an object that has been created by the function xgboost, and which correspond to the optimal gbm model.

train

a dataframe that correspond to the training data after the cleaning and filtering function were applied.

fitting

the fitted values.

goodness_of_fit

a dataframe that contains the goodness of fitting metrics.

gbm_cv_results

a dataframe the training accuracy metrics (R2, RMSE and CVRMSE) and values of the tuning hype-parameters.

tuned_parameters

a list of the best hyper-parameters

pred

a dataframe that correspond to the prediction data after the cleaning and filtering function were applied.

prediction

the predicted values.


samirtouzani/GBMbaseline documentation built on May 29, 2019, 1:02 p.m.