Applies a fast-and-frugal tree to a dataset and generates several accuracy statistics
apply.tree(data, formula, tree.definitions, sens.w = 0.5,
cost.outcomes = c(0, 1, 1, 0), cost.cues = NULL, allNA.pred = FALSE)
dataframe. A model training dataset. An m x n dataframe containing n cue values for each of the m exemplars.
A formula
dataframe. Definitions of one or more trees. The dataframe must contain the columns: cues, classes, thresholds, directions, exits.
numeric. A number from 0 to 1 indicating how to weight sensitivity relative to specificity. Only used for calculating wacc values.
numeric. A vector of length 4 specifying the costs of a hit, false alarm, miss, and correct rejection rspectively. E.g.; cost.outcomes = c(0, 10, 20, 0)
means that a false alarm and miss cost 10 and 20 respectively while correct decisions have no cost.
dataframe. A dataframe with two columns specifying the cost of each cue. The first column should be a vector of cue names, and the second column should be a numeric vector of costs. Cues in the dataset not present in cost.cues
are assume to have 0 cost.
logical. What should be predicted if all cue values in tree are NA? Default is FALSE
A list of length 4 containing