Learn R Programming

rtemis (version 0.79)

mplot3.cart: mplot3: data.tree trees

Description

Plot data.tree trees using data.tree::plot.Node

Usage

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)

Arguments

node.cond

Logical: If TRUE, print the splitting condition inside each node. Default = TRUE

node.prob

Logical: If TRUE, print the probability estimate for the first class of the outcome inside each node. Default = TRUE

node.estimate

Logical: If TRUE, print the estimated outcome level inside each node. Default = FALSE

node.n

Logical: If TRUE, print the number of cases (from training data) that matched this condition

Details

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".