probabilitiesFromConfusionMatrix: Helper function to calculate probability from confusion...

View source: R/tidyConvertToProbabilities.R

probabilitiesFromConfusionMatrixR Documentation

Helper function to calculate probability from confusion matrix stats in dplyr friendly manner

Description

The purpose of this is to calculate the probabilities of binary outcomes from a table of true pos, true neg, false pos and false neg trials

Usage

probabilitiesFromConfusionMatrix(df, tpVar, fpVar, fnVar, tnVar)

Arguments

df

a dataframe containing one observation per row

tpVar

the datatable column containing frequency of cooccurrence of true positives

fpVar

the datatable column containing frequency of occurrence of false positives

fnVar

the datatable column containing frequency of occurrence of false negatives

tnVar

the datatable column containing frequency of occurrence of true negatives

Value

the datatable with additional columns for all the probabilities associated with each outcome (i.e. a 2x2 confusion matrix)


terminological/tidy-info-stats documentation built on Nov. 19, 2022, 11:23 p.m.