calc_stats_binclass: calc_stats_binclass returns sensitivity, specificity,...

View source: R/calc_stats_binclass.R

calc_stats_binclassR Documentation

calc_stats_binclass returns sensitivity, specificity, positive predictive value, etc. from input true positive, true negative, false positive, false negative. from binary classification. https://en.wikipedia.org/wiki/Positive_and_negative_predictive_values#Relationship

Description

calc_stats_binclass returns sensitivity, specificity, positive predictive value, etc. from input true positive, true negative, false positive, false negative. from binary classification. https://en.wikipedia.org/wiki/Positive_and_negative_predictive_values#Relationship

Usage

calc_stats_binclass(
  tp,
  fp,
  fn,
  tn,
  targets = c("actual.positive", "actual.negative", "predicted.positive",
    "predicted.negative", "sensitivity", "specificity", "false.positive.rate",
    "false.negative.rate", "positive.predictive.value", "negative.predictive.value",
    "false.omission.rate", "false.discovery.rate", "positive.likelihood.ratio",
    "negative.likelihood.ratio", "markedness", "diagnostic.odds.ratio",
    "total.populatio", "prevalence", "accuracy", "balanced accuracy", "informedness",
    "prevalence.threshold", "f1.score", "fowlkes-mallows.index", 
    
    "matthews.correction.coefficient", "threat.score")
)

Arguments

tp

true positive number

fp

false positive number (type 1 error)

fn

false negative number (type 2 error)

tn

true negative number

targets

character vector of statistics to calculate


brandonsie/bms documentation built on Nov. 17, 2023, 11:38 a.m.