confusion.matrix.diagnostic.odds.ratio.simple: Confusion Matrix Measures - Diagnostic Odds Ratio

View source: R/confusion.matrix.diagnostic.odds.ratio.simple.R

confusion.matrix.diagnostic.odds.ratioR Documentation

Confusion Matrix Measures - Diagnostic Odds Ratio

Description

Calculate Diagnostic Odds Ratio, defined as Positive Likelihood Ratio / Negative Likelihood Ratio, for a given confusion matrix.

Usage

confusion.matrix.diagnostic.odds.ratio(confusion.matrix)

confusion.matrix.diagnostic.odds.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),
  true.negative.rate = confusion.matrix.true.negative.rate.simple(true.negative =
    true.negative, count.negative = count.negative),
  false.negative.rate = confusion.matrix.false.negative.rate.simple(false.negative =
    false.negative, count.positive = count.positive),
  positive.likelihood.ratio =
    confusion.matrix.positive.likelihood.ratio.simple(true.positive.rate =
    true.positive.rate, false.positive.rate = false.positive.rate),
  negative.likelihood.ratio =
    confusion.matrix.negative.likelihood.ratio.simple(true.negative.rate =
    true.negative.rate, false.negative.rate = false.negative.rate)
)

Arguments

confusion.matrix

Matrix - confusion matrix.

true.positive

Scalar - Cases identified as true positive

false.negative

Scalar - Cases identified as false negative

count.positive

Scalar - Total cases identified as positive - optional if first four parameters are used.

false.positive

Scalar - Cases identified as false positive

true.negative

Scalar - Cases identified as true negative

count.negative

Scalar - Total cases identified as negative - optional if first four parameters are used.

true.positive.rate

Scalar - True positive rate, overrides other parameters used to calculate TPR.

false.positive.rate

Scalar - False positive rate, overrides other parameters used to calculate FPR.

true.negative.rate

Scalar - True negative rate, overrides other parameters used to calculate TNR.

false.negative.rate

Scalar - False negative rate, overrides other parameters used to calculate FNR.

positive.likelihood.ratio

Scalar - Positive Likelihood Ratio, overrides other parameters used to calculate positive likelihood ratio.

negative.likelihood.ratio

Scalar - Negative Likelihood Ratio, overrides other parameters used to calculate negative likelihood ratio.

Value

A scalar with computed value.


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