# NOT RUN {
x <- cbind(intercept=100,data.matrix(iris[1:2]))
y <- ifelse(iris$Species=="setosa","setosa","not_setosa")
w <- bmrm(hingeLoss(x,y)); f <- x %*% w; Y <- sign(f)
w <- bmrm(logisticLoss(x,y)); f <- x %*% w; Y <- exp(f) / (1+exp(f));
w <- bmrm(rocLoss(x,y)); f <- x %*% w;
w <- bmrm(fbetaLoss(x,y)); f <- x %*% w;
# }
Run the code above in your browser using DataLab