Learn R Programming

FFTrees (version 1.1.8)

plot.FFTrees: Draws a FFTrees object.

Description

The primary purpose of this function is to visualize a Fast and Frugal Tree (FFT) for data that has already been classified using the FFTrees() function. However, if the data have not yet been classified, the function can also implement a tree specified by the user. Inputs with the (M) header are manditory. If the tree has already been implimented, then only inputs with the (A) header should be entered. If the tree has not been implimented, then only inputs with the (B) header should be entered.

Usage

"plot"(x = NULL, data = "train", which.tree = NULL, tree = "best.train", main = "Data", n.per.icon = NULL, decision.names = c("Noise", "Signal"), ...)

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.
which.tree
depreciated argument, only for backwards compatibility, use "tree" instead.
tree
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 v (HR - FAR), use "best.train" or "best.test"
main
The main plot label.
n.per.icon
Number of exemplars per icon
decision.names
A string vector of length 2 indicating the content-specific name for noise and signal cases.
...
Currently ignored.

Examples

Run this code

# 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.names = c("Absent", "Present"))


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



Run the code above in your browser using DataLab