TreeModels {LOGANTree}R Documentation

Tree-based Model Training

Description

Tree-based Model Training

Usage

TreeModels(
  traindata = NULL,
  seed = 2022,
  methodlist = c("dt", "rf", "gbm"),
  iternumber = 10,
  dt.gridsearch = NULL,
  rf.gridsearch = NULL,
  gbm.gridsearch = NULL,
  checkprogress = FALSE
)

Arguments

traindata

A data.frame with the training data set. Please name the outcome variable as "perf".

seed

A numeric value for set.seed. It is set to be 2022 by default.

methodlist

A list of the tree-based methods to model. The default is methodlist = c("dt", "rf", "gbm").

iternumber

Number of resampling iterations/Number of folds for the cross-validation scheme.

dt.gridsearch

A data.frame of the tuning grid, which allows for specifying parameters for decision tree model.

rf.gridsearch

A data.frame of the tuning grid, which allows for specifying parameters for random forest model.

gbm.gridsearch

A data.frame of the tuning grid, which allows for specifying parameters for gradient boosting model.

checkprogress

Logical. Print the modeling progress if it is TRUE. The default is FALSE.

Details

This function performs the modeling step of a predictive analysis. The selected classifiers are used for modeling the provided training dataset under a cross-validation scheme. Users have the possibility to choose which model they want to compare by specifying it on the methodlist argument. The caretEnsemble package is used in the modeling process to ensure that all models follow the same resampling procedures. ROC is used to select the optimal model for each tree-based method using the largest value. Finally, a summary report is displayed.

Value

This function returns two lists:

ModelObject An object with results from selected models

SummaryReport A data.frame with the summary of model parameters. The summary report is shown automatically in the output.

Examples


colnames(training)[14] <- "perf"
ensemblist <- TreeModels(traindata = training,
methodlist = c("rf","gbm","dt"),checkprogress = TRUE)

ensemblist <- TreeModels(traindata = training,
methodlist = c("rf"),
rf.gridsearch = data.frame(mtry = 2, splitrule = "gini", min.node.size = 1))


[Package LOGANTree version 0.1.1 Index]