TP_FP.rates: Calculates TP and FP rates

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Calculates TP and FP rates, given a list of scores and a list of classes

Usage

1

Arguments

predictions

An array where each element contains a predicted score of each instance

classes

A vector with class for each instance

Details

We calculate a TPR (True positive rate) and FPR (False positive rate) rates for each threshold between each pair of scores or predictions values.

We consider "1" for positives class (P), and "0" for negatives class (N)

TP: Number of true positives.
FP: Number of false positives.
TPR: Estimate as: TP/P.
FPR: Estimate as: FP/N.

Value

An array with two columns, first one corresponding to TPR and second one corresponding to FPR.

Author(s)

Paulina Morillo: paumoal@inf.upv.es

References

Drummond, C., & Holte, R. C. (2006). Cost curves: An improved method for visualizing classifier performance.

See Also

BrierCurves, CostCurves, CostLines, KendallCurves, predictions, RateDrivenCurves, TestOptimal, TrainOptimal

Examples

1
2
3
predictions <- round(runif(10), 0)
classes <- round(runif(10), 1)
TP_FP.rates(predictions, classes)

paumoal/costcurvespkg documentation built on May 30, 2019, 4:05 p.m.