TestOptimal: Plotting lower envelope of Cost Curves

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

Description

Function to plot of lower envelope of Cost Curves

Usage

1
2
3
4
TestOptimal(predictions,classes,uniquec=FALSE, loss2skew=FALSE, hold=FALSE,
            plotOFF=FALSE, gridOFF=TRUE, pointsOFF=TRUE, legendOFF=FALSE,
            main, xlab, ylab, namesClassifiers, lwd, lty, col, pch, cex,
            xPosLegend,yPosLegend, cexL)

Arguments

predictions

A list with predicted scores.

classes

A list with labels, (only binary classes).

uniquec

If it is TRUE, the same array classes is used for each array in a list predictions.

loss2skew

If it is TRUE, loss by Skew is plotted otherwise loss by cost is plotted.

hold

If it is TRUE, the plot is maintained open allowing to insert new curves on the same plot.

plotOFF

Disable/enable plot visualization, only return AUC values.

gridOFF

Disable/enable grid visualization.

pointsOFF

Disable/enable point marks visualization.

legendOFF

Disable/enable legend visualization.

main

title.

xlab

x label.

ylab

y label.

namesClassifiers

An array with names of each classifier.

lwd

Line width.

lty

Line type.

col

Line color.

pch

Point type.

cex

Size point.

xPosLegend

x coordinate to be used to position the legend.

yPosLegend

y coordinate to be used to position the legend.

cexL

size of box legend.

Details

The lower envelope at any given c (cost) or z (skew) value is defined as the lowest loss value on any of the given cost curves at that c or z. Each segment of lower envelope or test optimal correspond to points on a ROC covex hull.

Value

A list of lists, for each classifier is returned: extreme points of each segment of lower envelope, thresholds and AUCC (area under curve cost).

Author(s)

Paulina Morillo: paumoal@inf.upv.es

References

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

Hernandez-Orallo, J., Flach, P., & Ferri, C. (2013). ROC curves in cost space. Machine learning, 93(1), 71-91.

See Also

BrierCurves, CostCurves, CostLines, KendallCurves, predictions, RateDrivenCurves, TP_FP.rates, TrainOptimal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#Load data
data(predictions)

#Loss by cost
R<-TestOptimal(list(predictions$A, predictions$B), list(predictions$classes), uniquec=TRUE)

#Loss by skew
R<-TestOptimal(list(predictions$A, predictions$B), list(predictions$classes), uniquec=TRUE,
	loss2skew = TRUE)

#names legend
R<-TestOptimal(list(predictions$A, predictions$B), list(predictions$classes, predictions$classes),
	plotOFF=TRUE)

#LegendOFF
R<-TestOptimal(list(predictions$A, predictions$B), list(predictions$classes), uniquec=TRUE,
	loss2skew = TRUE, pointsOFF=FALSE, legendOFF=TRUE, gridOFF=FALSE)

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