Learn R Programming

PatientLevelPrediction (version 3.0.0)

setDecisionTree: Create setting for DecisionTree with python

Description

Create setting for DecisionTree with python

Usage

setDecisionTree(maxDepth = 10, minSamplesSplit = 2, minSamplesLeaf = 10,
  minImpurityDecrease = 10^-7, seed = NULL, classWeight = "None",
  plot = F)

Arguments

maxDepth

The maximum depth of the tree

minSamplesSplit

The minimum samples per split

minSamplesLeaf

The minimum number of samples per leaf

minImpurityDecrease

Threshold for early stopping in tree growth. A node will split if its impurity is above the threshold, otherwise it is a leaf.

seed

The random state seed

classWeight

Balance or None

plot

Boolean whether to plot the tree (requires python pydotplus module)

Examples

Run this code
# NOT RUN {
model.decisionTree <- setDecisionTree(maxDepth=10,minSamplesLeaf=10, seed=NULL )
# }

Run the code above in your browser using DataLab