# NOT RUN {
x <- cbind(data.matrix(iris[1:4]))
y <- ifelse(iris$Species=="versicolor","versicolor","not_versicolor")
w <- bmrm(rocLoss(x,y),LAMBDA=0.01)
with(roc.stat(x %*% w,y=="versicolor"),plot(FPR,TPR,type="l"))
with(roc.stat(-x[,2],y=="versicolor"),lines(FPR,TPR,col="blue"))
# }
Run the code above in your browser using DataLab