Learn R Programming

FFTrees (version 2.0.0)

fftrees_ffttowords: Describe a fast-and-frugal tree (FFT) in words

Description

fftrees_ffttowords provides a verbal description of tree definition (as defined in an FFTrees object). Thus, fftrees_ffttowords translates an abstract FFT definition into natural language output.

fftrees_ffttowords is the complement function to fftrees_wordstofftrees, which parses a verbal description of an FFT into the abstract tree definition of an FFTrees object.

The final sentence (or tree node) of the FFT's description always predicts positive criterion values (i.e., TRUE instances) first, before predicting negative criterion values (i.e., FALSE instances). Note that this may require a reversal of exit directions, if the final cue predicted FALSE instances.

Note that the cue directions and thresholds computed by FFTrees always predict positive criterion values (i.e., TRUE or signal, rather than FALSE or noise). Using these thresholds for negative exits (i.e., for predicting instances of FALSE or noise) usually requires a reversal (e.g., negating cue direction).

Usage

fftrees_ffttowords(x = NULL, mydata = "train", digits = 2)

Value

A modified FFTrees object x with x$trees$inwords containing a list of string vectors.

Arguments

x

An FFTrees object created with FFTrees.

mydata

The type of data to which a tree is being applied (as character string "train" or "test"). Default: mydata = "train".

digits

How many digits to round numeric values (as integer)?

See Also

fftrees_wordstofftrees for converting a verbal description of an FFT into an FFTrees object; fftrees_create for creating FFTrees objects; fftrees_grow_fan for creating FFTs by applying algorithms to data; print.FFTrees for printing FFTs; plot.FFTrees for plotting FFTs; summary.FFTrees for summarizing FFTs; FFTrees for creating FFTs from and applying them to data.

Examples

Run this code

heart.fft <- FFTrees(diagnosis ~ .,
  data = heartdisease,
  decision.labels = c("Healthy", "Disease")
)

inwords(heart.fft)

Run the code above in your browser using DataLab