mplot3
: data.tree
treesPlot data.tree
trees using data.tree::plot.Node
mplot3.cart(object, col.positive = "#F48024DD",
col.negative = "#18A3ACDD", col.lo = ucsfCol$teal,
col.mid = "gray20", col.hi = ucsfCol$orange, node.col = "#666666",
node.shape = "none", node.labels = TRUE, node.cond = TRUE,
node.prob = TRUE, node.estimate = NULL, node.n = TRUE,
edge.col = "#999999", edge.width = 2, edge.labels = FALSE,
arrowhead = "vee", layout = "dot", drop.leaves = FALSE,
rankdir = "TB", splines = "polyline", fontname = "helvetica",
bg.color = "white", overlap = "false", prune = FALSE,
prune.empty.leaves = TRUE, remove.bad.parents = TRUE,
rpart.cp = NULL, verbose = TRUE)
Logical: If TRUE, print the splitting condition inside each node. Default = TRUE
Logical: If TRUE, print the probability estimate for the first class of the outcome inside each node. Default = TRUE
Logical: If TRUE, print the estimated outcome level inside each node. Default = FALSE
Logical: If TRUE, print the number of cases (from training data) that matched this condition
If you want to show split conditions as edge labels (edge.labels = TRUE
),
it is recommened to set rankdir = "LR"
and node.cond = FALSE
.
Edge labels in graphviz are shown to the right of
the edge when rankdir = "TB"
and above when rankdir = "LR"
.