Description Usage Arguments Details Value Author(s) References See Also Examples
Function to plot Cost Curves using Rate Driven threshold Choice
1 2 3 4 |
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 view is maintained to plot a new curve above the current curve. |
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. |
The rate-driven threshold choice method is a natural way of choosing the thresholds, especially when we only have a ranking or a poorly calibrated probabilistic caddifier.
The rate driven cost curves by cost is defined as a plot of:
2(c*pi0(1-F0((R^-1(c))))+(1-c)pi1*F1((R^-1(c))))
on the axis y against cost c
The rate driven cost curves by skew is defined as a plot of:
z(1-F0(R^-1(c)))+(1-z)F1(R^-1(c)))
on the axis y against skew z
and
R(t)=pi0*F0(t)+pi1*F1(t), by c
R(t)=(F0(t)+F1(t))/2, by z
Where:
c: | cost values of x_axis between [0, 1]. | |
z: | skew values of x_axis between [0, 1]. | |
t: | threshold t=R^-1(c) or t=R^-1(c) as appropriate, and c=R(t) | |
pi0: | negative class proportion (Y==0)/length(Y). | |
pi1: | positive class proportion (Y==1)/length(Y). | |
F1(t): | false positive rate of specific threshold. | |
1-F0(t): | true positive rate of specific threshold. | |
R(c): | recall that the predicted positive rate. |
An array with AUKC (Area Under Kendall Curve) for each test.
Paulina Morillo: paumoal@inf.upv.es
Hernandez-Orallo, J., Flach, P., & Ferri, C. (2013). ROC curves in cost space. Machine learning, 93(1), 71-91.
BrierCurves, CostCurves, CostLines, KendallCurves, predictions, TestOptimal, TP_FP.rates, TrainOptimal
1 2 3 4 5 6 7 8 9 | #Load data
data(predictions)
#Loss by cost
R<-RateDrivenCurves(list(predictions$A, predictions$B),list(predictions$classes), uniquec=TRUE)
#Loss by skew
R<-RateDrivenCurves(list(predictions$A, predictions$B), list(predictions$classes), uniquec=TRUE,
loss2skew = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.