confusion.matrix.matthews.correlation.coefficient.simple: Confusion Matrix Measures - Matthews' Correlation Coefficient

View source: R/confusion.matrix.matthews.correlation.coefficient.simple.R

confusion.matrix.matthews.correlation.coefficientR Documentation

Confusion Matrix Measures - Matthews' Correlation Coefficient

Description

Calculate Matthews' Correlation Coefficient, defined as (TP*TN - FP*FN)/sqrt((TP+FP)(TP+FN)(TN+FP)(TN+FN)), for a given confusion matrix.

Usage

confusion.matrix.matthews.correlation.coefficient(confusion.matrix)

cor.matthews(confusion.matrix)

confusion.matrix.matthews.correlation.coefficient.simple(
  true.positive = 1,
  false.positive = 1,
  true.negative = 1,
  false.negative = 1
)

cor.matthews.simple(
  true.positive = 1,
  false.positive = 1,
  true.negative = 1,
  false.negative = 1
)

Arguments

confusion.matrix

Matrix - confusion matrix.

true.positive

Scalar - Cases identified as true positive

false.positive

Scalar - Cases identified as false positive

true.negative

Scalar - Cases identified as true negative

false.negative

Scalar - Cases identified as false negative

Value

A scalar with computed value.


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