FFTrees (version 1.3.5)

classtable: Calculates several classification statistics from binary prediction and criterion (e.g.; truth) vectors

Description

Calculates several classification statistics from binary prediction and criterion (e.g.; truth) vectors

Usage

classtable(prediction.v, criterion.v, sens.w = 0.5, cost.v = NULL,
  cost.outcomes = c(0, 1, 1, 0))

Arguments

prediction.v

A binary vector of predictions

criterion.v

A binary vector of criterion (true) values

sens.w

numeric. Weight given to sensitivity, must range from 0 to 1.

cost.v

numeric. An optional vector of additional costs to be added to each case.

cost.outcomes

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.

Examples

Run this code
# NOT RUN {

 # classification statistics for 5 cases
classtable(prediction.v = c(0, 0, 0, 1, 1),
           criterion.v = c(0, 0, 1, 0, 1))



# }

Run the code above in your browser using DataCamp Workspace