FFTrees (version 1.3.5)

plot.FFTrees: Plots an FFTrees object.

Description

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

Usage

# S3 method for FFTrees
plot(x = NULL, data = "train", what = "tree",
  tree = "best.train", main = NULL, 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

Either a dataframe of new data, or 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.

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

depricated arguments.

...

Currently ignored.

Examples

Run this code
# NOT RUN {
# 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")



# }

Run the code above in your browser using DataLab