TrainOptimal: Plotting Cost Curves using the Optimal Training threshold...

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

Description

Function to plot the optimal training curve

Usage

1
2
3
4
5
TrainOptimal(predictions_train, classes_train, predictions_test, classes_test,
                uniquecT=FALSE, uniquect=FALSE, refuseT=FALSE, loss2skew=FALSE,
                hold=FALSE, plotOFF=FALSE, pointsOFF=TRUE, gridOFF=TRUE,legendOFF=FALSE,
                main, xlab, ylab, namesClassifiers,namesTests, lwd, lty, col,pch, 
                cex, xPosLegend,yPosLegend, cexL)

Arguments

predictions_train

A list with predicted scores. Train Dataset

classes_train

A list with labels, (only binary classes). Train Dataset

predictions_test

A list with predicted scores. Train Dataset

classes_test

A list with labels, (only binary classes). Test Dataset

uniquecT

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

uniquect

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

refuseT

It is possible to use the same training classifier for every test.

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.

namesTests

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

This function plot the cost curves on a test considering the optimal threshold on a train dataset.

Value

An array with AUCC (Area Under Cost Curve) for each test.

Author(s)

Paulina Morillo: paumoal@inf.upv.es

References

#It reference is not exact. 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, TestOptimal, TP_FP.rates

Examples

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

#Loss by Skew
R<-TrainOptimal(list(predictions$A), list(predictions$classes), 
	list(predictions$A, predictions$B), list(predictions$classes), 
	uniquect = TRUE, uniquecT = TRUE, loss2skew = TRUE, refuseT = TRUE)

#Loss by Cost
R<-TrainOptimal(list(predictions$A, predictions$B), list(predictions$classes),
	list(predictions$B, predictions$A), list(predictions$classes), uniquect = TRUE,
	namesClassifiers=c("A", "B"), namesTests=c("B","A"), uniquecT = TRUE)
	

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