precision_gain: Precision Gain

Description Usage Arguments Details Value

Description

This function calculates Precision Gain from the entries of the contingency table: number of true positives (TP), false negatives (FN), false positives (FP), and true negatives (TN). More information on Precision-Recall-Gain curves and how to cite this work is available at http://www.cs.bris.ac.uk/~flach/PRGcurves/.

Usage

1
precision_gain(TP, FN, FP, TN)

Arguments

TP

number of true positives, can be a vector

FN

number of false negatives, can be a vector

FP

number of false positives, can be a vector

TN

number of true negatives, can be a vector

Details

Precision Gain (PrecGain) quantifies by how much precision is improved over the default precision of the always positive predictor, equal to the proportion of positives (pi). PrecGain=1 stands for maximal improvement (Prec=1) and PrecGain=0 stands for no improvement (Prec=pi). If Prec=0, then PrecGain=-Inf. It can happen that PrecGain=NaN, for instance if there are no positives (TP=0 and FN=0) and TN>0.

Value

Precision Gain (a numeric value less than or equal to 1; or -Inf or NaN, see the details below)


Simon-Coetzee/StatePaintR documentation built on May 9, 2019, 1:31 p.m.