Learn R Programming

FFTrees (version 1.8.0)

classtable: Compute classification statistics for binary prediction and criterion (e.g.; truth) vectors

Description

The main input are 2 logical vectors of prediction and criterion values.

Usage

classtable(
  prediction_v = NULL,
  criterion_v = NULL,
  sens.w = NULL,
  cost.v = NULL,
  correction = 0.25,
  cost.outcomes = list(hi = 0, fa = 1, mi = 1, cr = 0),
  na_prediction_action = "ignore"
)

Arguments

prediction_v

logical. A logical vector of predictions.

criterion_v

logical. A logical vector of (TRUE) criterion values.

sens.w

numeric. Sensitivity weight parameter (from 0 to 1, for computing wacc). Default: sens.w = NULL (to enforce that actual value is being passed by the calling function).

cost.v

list. An optional list of additional costs to be added to each case.

correction

numeric. Correction added to all counts for calculating dprime.

cost.outcomes

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, respectively. For instance, 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.

na_prediction_action

What happens when no prediction is possible? (experimental).

Details

The primary confusion matrix is computed by confusionMatrix of the caret package.