
Last chance! 50% off unlimited learning
Sale ends in
Plot a decision tree.
# S3 method for C5.0
plot(x, trial = 0, subtree = NULL, ...)
an object of class C5.0
an integer for how many boosting iterations are
used for prediction. NOTE: the internals of C5.0
are
zero-based so to get the initial decision tree you must use
trial = 0
. If trial
is set too large, it is reset
to the largest value and a warning is given.
an optional integer that can be used to isolate
nodes below the specified split. See
partykit::party()
for more details.
options passed to partykit::plot.party()
No value is returned; a plot is rendered.
Quinlan R (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers, http://www.rulequest.com/see5-unix.html
# NOT RUN {
mod1 <- C5.0(Species ~ ., data = iris)
plot(mod1)
plot(mod1, subtree = 3)
mod2 <- C5.0(Species ~ ., data = iris, trials = 10)
plot(mod2) ## should be the same as above
## plot first weighted tree
plot(mod2, trial = 1)
# }
Run the code above in your browser using DataLab