Learn R Programming

FFTrees (version 1.7.0)

fftrees_apply: Apply an FFT to data and generate accuracy statistics

Description

fftrees_apply applies a fast-and-frugal tree (FFT, as an FFTrees object) to a dataset and generates corresponding accuracy statistics.

fftrees_apply is called internally by the main FFTrees function (with mydata = "train" and --- if test data exists --- mydata = "test") and when predicting outcomes for new data by predict.FFTrees.

Usage

fftrees_apply(x, mydata = NULL, newdata = NULL, allNA.pred = FALSE)

Value

A modified FFTrees object (with lists in x$trees containing information on FFT decisions and statistics).

Arguments

x

An FFT to apply (as an FFTrees object).

mydata

character. Data type to which FFT should be applied (either "train" or "test").

newdata

dataframe. New data to which FFT should be applied.

allNA.pred

logical. What should be predicted if all cue values in tree are NA? Default is FALSE.

See Also

FFTrees for creating FFTs from and applying them to data.