50% off | Unlimited Data & AI Learning

Last chance! 50% off unlimited learning

Sale ends in


FFTrees (version 1.2.3)

apply.tree: Applies a fast and frugal tree to a dataset.

Description

Applies a fast and frugal tree to a dataset.

Usage

apply.tree(data, formula, tree.definitions, sens.w = 0.5)

Arguments

data

dataframe. A model training dataset. An m x n dataframe containing n cue values for each of the m exemplars.

formula

A formula

tree.definitions

dataframe. Definitions of one or more trees. The dataframe must contain the columns: cues, classes, thresholds, directions, exits.

sens.w

numeric. A number from 0 to 1 indicating how to weight sensitivity relative to specificity. Only used for calculating wacc values.

Value

A list of length 4 containing

Examples

Run this code


  tree.definitions <- data.frame("tree" = 1,
                                 "cues" = "sex;age",
                                 "thresholds" = "male;adult",
                                 "directions" = "=;="
                                 )


Run the code above in your browser using DataLab