confusion.matrix.true.positive.rate.simple: Confusion Matrix Measures - True Positive Rate In burrm/lolcat: Miscellaneous Useful Functions

 confusion.matrix.true.positive.rate R Documentation

Confusion Matrix Measures - True Positive Rate

Description

Calculate True Positive Rate, defined as TP/P, for a given confusion matrix. True positive rate is also sometimes called sensitivity, recall, and hit rate.

Usage

``````confusion.matrix.true.positive.rate(confusion.matrix)

confusion.matrix.sensitivity(confusion.matrix)

confusion.matrix.recall(confusion.matrix)

confusion.matrix.hit.rate(confusion.matrix)

confusion.matrix.true.positive.rate.simple(
true.positive = 0,
false.negative = 1,
count.positive = true.positive + false.negative
)

confusion.matrix.sensitivity.simple(
true.positive = 0,
false.negative = 1,
count.positive = true.positive + false.negative
)

confusion.matrix.recall.simple(
true.positive = 0,
false.negative = 1,
count.positive = true.positive + false.negative
)

confusion.matrix.hit.rate.simple(
true.positive = 0,
false.negative = 1,
count.positive = true.positive + false.negative
)
``````

Arguments

 `confusion.matrix` Matrix - confusion matrix. `true.positive` Scalar - Cases identified as true positive `false.negative` Scalar - Cases identified as false negative - optional if count.positive specified `count.positive` Scalar - Total cases identified as positive - optional if false.negative specified.

Value

A scalar with computed value.

burrm/lolcat documentation built on March 30, 2023, 2:21 p.m.