gbm_baseline: Gradient boosting machine baseline model function.

Description Usage Arguments Value

View source: R/gbm_baseline.R

Description

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

Usage

1
2
3
4
5
6
gbm_baseline(train_path = NULL, pred_path = NULL, days_off_path = NULL,
  train_Data = NULL, pred_Data = NULL, k_folds = 5,
  variables = c("Temp", "tow"), ncores = parallel::detectCores(logical = F),
  cv_blocks = "weeks", iter = seq(from = 50, to = 300, by = 25),
  depth = c(3:7), lr = c(0.05, 0.1), subsample = c(0.5),
  verbose = FALSE)

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.

train_Data

A dataframe, of the training period, where the columns correspond to the time steps (time), the energy load (eload) and to the Temperature (Temp).

pred_Data

A dataframe, of the prediction period, where the columns correspond to the time steps (time), the energy load (eload) and to the Temperature (Temp).

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

A vector with combination of the number of iterations.

depth

A vector with combination of the maximum depths.

lr

A vector with combination of the learning rates.

subsample

A vector with combination of subsamples.

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.


LBNL-ETA/RMV2.0 documentation built on Nov. 9, 2020, 5:44 a.m.