Grows fast-and-frugal trees using the fan algorithm
fan.algorithm(formula, data, max.levels = 5, algorithm = "ifan",
goal = "wacc", goal.chase = "bacc", goal.threshold = "bacc",
sens.w = 0.5, cost.outcomes = list(hi = 0, fa = 1, mi = 1, cr = 0),
cost.cues = NULL, numthresh.method = "o", numthresh.n = 20,
stopping.rule = "exemplars", stopping.par = 0.1, rounding = NULL,
quiet = TRUE, repeat.cues = TRUE)
formula. A formula
dataframe. A dataset
integer. The maximum number of levels in the tree(s)
character. A string indicating how to rank cues during tree construction. "ifan" (independent fan) means that cues will only be ranked once with the entire training dataset "dfan" (dependent fan) means that cues will be ranked after each level in the tree with the remaining unclassified training exemplars.
character. A string indicating the statistic to maximize: "acc" = overall accuracy, "bacc" = balanced accuracy, "wacc" = weighted accuracy, "bacc" = balanced accuracy
character. A string indicating the statistic to maximize when constructing trees: "acc" = overall accuracy, "wacc" = weighted accuracy, "bacc" = balanced accuracy
character. A string indicating the statistic to maximize when calculting cue thresholds: "acc" = overall accuracy, "wacc" = weighted accuracy, "bacc" = balanced accuracy
numeric. A number from 0 to 1 indicating how to weight sensitivity relative to specificity.
list. A list of length 4 with names 'hi', 'fa', 'mi', and 'cr' specifying the costs of a hit, false alarm, miss, and correct rejection rspectively. E.g.; cost.outcomes = listc("hi" = 0, "fa" = 10, "mi" = 20, "cr" = 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.
character. How should thresholds for numeric cues be determined? "o"
will optimize thresholds, while "m"
will always use the median.
numeric. Number of threshold values to consider.
character. A string indicating the method to stop growing trees. "levels"
means the tree grows until a certain level, "exemplars"
means the tree grows until a certain number of unclassified exemplars remain. "statdelta"
means the tree grows until the change in the criterion statistic is less than a specified level.
numeric. A number indicating the parameter for the stopping rule. For stopping.rule == "levels"
, this is the number of levels. For stopping rule "exemplars"
, this is the smallest percentage of examplars allowed in the last level.
integer. How much should threshold parameters be rounded? Default is
logical. Should tree growing progress be displayed?
logical. Can cues occur multiple times within a tree?
Currently ignored
A definition of an FFT