confusion.matrix.positive.likelihood.ratio.simple: Confusion Matrix Measures - Positive Likelihood Ratio

View source: R/confusion.matrix.positive.likelihood.ratio.simple.R

confusion.matrix.positive.likelihood.ratioR Documentation

Confusion Matrix Measures - Positive Likelihood Ratio

Description

Calculate Positive Likelihood Ratio, defined as TPR/FPR, for a given confusion matrix.

Usage

confusion.matrix.positive.likelihood.ratio(confusion.matrix)

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

Arguments

confusion.matrix

Matrix - confusion matrix.

true.positive

Scalar - Cases identified as true positive - optional if TPR specified

false.negative

Scalar - Cases identified as false negative - optional if TPR specified

count.positive

Scalar - Total cases identified as positive - optional if TPR specified.

false.positive

Scalar - Cases identified as false positive - optional if FPR specified

true.negative

Scalar - Cases identified as true negative - optional if FPR specified

count.negative

Scalar - Total cases identified as negative - optional if FPR specified.

true.positive.rate

Scalar - True Positive Rate (TPR) - optional if TPR parameters specified.

false.positive.rate

Scalar - False Positive Rate (FPR) - optional if FPR parameters specified.

Value

A scalar with computed value.


burrm/lolcat documentation built on Sept. 15, 2023, 11:35 a.m.