setDecisionTree: Create setting for DecisionTree with python

Description Usage Arguments Examples

View source: R/DecisionTree.R

Description

Create setting for DecisionTree with python

Usage

1
2
3
4
5
6
7
8
9
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

1
2
3
4
## Not run: 
model.decisionTree <- setDecisionTree(maxDepth=10,minSamplesLeaf=10, seed=NULL )

## End(Not run)

hxia/plp-git-demo documentation built on March 19, 2021, 1:54 a.m.