plot.FFTrees: Plots an FFTrees object.

Description Usage Arguments Examples

View source: R/plotFFTrees_function.R

Description

Plots an FFTrees object created by the FFTrees() function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
## S3 method for class 'FFTrees'
plot(
  x = NULL,
  data = "train",
  what = "tree",
  tree = 1,
  main = NULL,
  hlines = TRUE,
  cue.labels = NULL,
  decision.labels = NULL,
  cue.cex = NULL,
  threshold.cex = NULL,
  decision.cex = 1,
  comp = TRUE,
  stats = TRUE,
  show.header = NULL,
  show.tree = NULL,
  show.confusion = NULL,
  show.levels = NULL,
  show.roc = NULL,
  show.icons = NULL,
  show.iconguide = NULL,
  label.tree = NULL,
  label.performance = NULL,
  n.per.icon = NULL,
  which.tree = NULL,
  level.type = "bar",
  decision.names = NULL,
  ...
)

Arguments

x

A FFTrees object created from "FFTrees()"

data

One of two strings 'train' or 'test'. In this case, the corresponding dataset in the x object will be used.

what

string. What should be plotted? 'tree' (the default) shows one tree (specified by 'tree'). 'cues' shows the marginal accuracy of cues in an ROC space, "roc" shows an roc curve of the tree(s)

tree

integer. An integer indicating which tree to plot (only valid when the tree argument is non-empty). To plot the best training (or test) tree with respect to the goal specified during FFT construction, use "best.train" or "best.test"

main

character. The main plot label.

hlines

logical. Should horizontal panel separation lines be shown?

cue.labels

character. An optional string of labels for the cues / nodes.

decision.labels

character. A string vector of length 2 indicating the content-specific name for noise and signal cases.

cue.cex

numeric. The size of the cue labels.

threshold.cex

numeric. The size of the threshold labels.

decision.cex

numeric. The size of the decision labels.

comp

logical. Should the performance of competitive algorithms (e.g.; logistic regression, random forests etc.) be shown in the ROC plot (if available?)

stats

logical. Should statistical information be plotted? If FALSE, then only the tree (without any reference to statistics) will be plotted.

show.header, show.tree, show.confusion, show.levels, show.roc, show.icons, show.iconguide

logical. Logical arguments indicating which specific elements of the plot to show.

label.tree, label.performance

string. Optional arguments to define lables for the tree and performance section(s).

n.per.icon

Number of cases per icon

which.tree

deprecated argument, only for backwards compatibility, use "tree" instead.

level.type

string. How should bottom levels be drawn? Can be "bar" or "line"

decision.names

deprecated arguments.

...

Currently ignored.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Create FFTrees of the heart disease data
heart.fft <- FFTrees(formula = diagnosis ~.,
data = heartdisease)

# Visualise the tree
plot(heart.fft,
     main = "Heart Disease Diagnosis",
     decision.labels = c("Absent", "Present"))


# See the vignette for more details
vignette("FFTrees_plot", package = "FFTrees")

FFTrees documentation built on July 2, 2020, 2:13 a.m.