getF1mcc: Get f1 / mcc

View source: R/MakeSigMatrix.R

getF1mccR Documentation

Get f1 / mcc

Description

Get f1 / mcc and other accuracy measurements for binary predictions. Provide either an estimate and reference vector e.g. getF1mcc(estimate, reference) Or TPs, FPs, etc. e.g. getF1mcc(tps=3, fps=4, tns=7, fns=2)

Usage

getF1mcc(
  estimate = NULL,
  reference = NULL,
  tps = NULL,
  fps = NULL,
  tns = NULL,
  fns = NULL
)

Arguments

estimate

A binary vector of predictions

reference

a binary vector of actual values

tps

The number of TPs

fps

The number of FPs

tns

The number of TNs

fns

The number of FNs

Value

A vector with sensitivity, specificity, fpr, fdr, f1, agreement, p.value, mcc, and mcc.p

Examples

estimates <- sample(c(runif(8), 0 ,0))
reference <- sample(c(runif(7), 0 , 0, 0))
accuracyStats <- getF1mcc(estimate=estimates>0, reference=reference>0)

ADAPTS documentation built on Sept. 14, 2022, 9:05 a.m.