Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.C5.0

Plot a decision tree


Description

Plot a decision tree.

Usage

## S3 method for class 'C5.0'
plot(x, trial = 0, subtree = NULL, ...)

Arguments

x

an object of class C5.0

trial

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.

subtree

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()

Value

No value is returned; a plot is rendered.

Author(s)

Mark Culp, Max Kuhn

References

Quinlan R (1993). C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers, http://www.rulequest.com/see5-unix.html

See Also

Examples

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)

C50

C5.0 Decision Trees and Rule-Based Models

v0.1.3.1
GPL-3
Authors
Max Kuhn [aut, cre], Steve Weston [ctb], Mark Culp [ctb], Nathan Coulter [ctb], Ross Quinlan [aut] (Author of imported C code), RuleQuest Research [cph] (Copyright holder of imported C code), Rulequest Research Pty Ltd. [cph] (Copyright holder of imported C code)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.