View source: R/plotBrierCurve.R
plotBrierCurve | R Documentation |
This function plots the brier curve based on a set of predictions generated by a binary classifier. Brier curves allow an evaluation of classifier performance in cost space.
plotBrierCurve(bc, curveType = c("brierCost", "brierSkew"))
bc |
A |
curveType |
the type of Brier curve to be plotted. Shoul be "brierCost" or"brierSkew". |
None
Koen W. De Bock, kdebock@audencia.com
Hernandez-Orallo, J., Flach, P., & Ferri, C. (2011). Brier Curves: a New Cost-Based Visualisation of Classifier Performance. Proceedings of the 28th International Conference on Machine Learning (ICML-11), 585–592.
brierCurve
, CSMES.ensNomCurve
##load data library(rpart) data(BFP) ##generate random order vector BFP_r<-BFP[sample(nrow(BFP),nrow(BFP)),] size<-nrow(BFP_r) ##size<-300 train<-BFP_r[1:floor(size/3),] val<-BFP_r[ceiling(size/3):floor(2*size/3),] test<-BFP_r[ceiling(2*size/3):size,] ##train CART decision tree model model=rpart(as.formula(Class~.),train,method="class") ##generate predictions for the tes set preds<-predict(model,newdata=test)[,2] ##calculate brier curve bc<-brierCurve(test[,"Class"],preds) ##plot briercurve plotBrierCurve(bc,curveType="cost")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.