Last chance! 50% off unlimited learning
Sale ends in
Applies a fast and frugal tree to a dataset.
apply.tree(data, formula, tree.definitions, sens.w = 0.5)
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.
A list of length 4 containing
tree.definitions <- data.frame("tree" = 1,
"cues" = "sex;age",
"thresholds" = "male;adult",
"directions" = "=;="
)
Run the code above in your browser using DataLab