fit_decision_tree,DecisionTreeClassifier-method {SSLR}R Documentation

Fit decision tree

Description

method in class DecisionTreeClassifier used to build a Decision Tree

Usage

## S4 method for signature 'DecisionTreeClassifier'
fit_decision_tree(
  object,
  X,
  y,
  min_samples_split = 20,
  min_samples_leaf = ceiling(min_samples_split/3),
  w = 0.5
)

Arguments

object

A DecisionTreeClassifier object

X

A object that can be coerced as data.frame. Training instances

y

A vector with the labels of the training instances. In this vector the unlabeled instances are specified with the value NA.

min_samples_split

the minimum number of observations to do split

min_samples_leaf

the minimum number of any terminal leaf node

w

weight parameter ranging from 0 to 1


[Package SSLR version 0.9.3.3 Index]