Skip to contents

Decision Tree

Usage

decisionTree(
  algo = "Decision Tree",
  engine = "rpart",
  mode = "classification",
  trainingData = NULL,
  splitedData = NULL,
  formula = NULL,
  rec = NULL,
  v = 5,
  gridNum = 5,
  iter = 10,
  metric = NULL,
  seed = 1234
)

Arguments

algo

A name of the algorithm which can be customized by user (default: "Decision Tree").

engine

The name of software that should be used to fit the model ("rpart" (default), "C50", "partykit").

mode

The model type. It should be "classification" or "regression" ("classification" (default), "regression").

trainingData

The training data.

splitedData

A data frame including metadata of split.

formula

formula for modeling

rec

Recipe object containing preprocessing information for cross-validation.

v

Applying v-fold cross validation in modeling process (default: 5).

gridNum

Initial number of iterations to run before starting the optimization algorithm.

iter

The maximum number of search iterations.

metric

Metric to evaluate the performance (classification: "roc_auc" (default), "accuracy" / regression: "rmse" (default), "rsq").

seed

Seed for reproducible results.

Details

The function for training user-defined Decision Tree model.

Hyperparameters for tuning: tree_depth, min_n, cost_complexity