# binaryClassificationLoss: Loss functions for binary classification In bmrm: Bundle Methods for Regularized Risk Minimization Package

## Description

Loss functions for binary classification

## Usage

 ```1 2 3 4 5 6 7``` ```logisticLoss(x, y, loss.weights = 1) rocLoss(x, y) fbetaLoss(x, y, beta = 1) hingeLoss(x, y, loss.weights = 1) ```

## Arguments

 `x` matrix of training instances (one instance by row) `y` a logical vector representing the training labels for each instance in x `loss.weights` numeric vector of loss weights to incure for each instance of x. Vector length should match length(y), but values are cycled if not of identical size. `beta` a numeric value setting the beta parameter is the f-beta score

## Value

a function taking one argument w and computing the loss value and the gradient at point w

## Functions

• `logisticLoss`: logistic regression

• `rocLoss`: Find linear weights maximize area under its ROC curve

• `fbetaLoss`: F-beta score loss function

• `hingeLoss`: Hinge Loss for Linear Support Vector Machine (SVM)

## References

Teo et al. A Scalable Modular Convex Solver for Regularized Risk Minimization. KDD 2007

nrbm

## Examples

 ```1 2 3 4 5``` ``` x <- cbind(intercept=100,data.matrix(iris[1:2])) w <- nrbm(hingeLoss(x,iris\$Species=="setosa"));predict(w,x) w <- nrbm(logisticLoss(x,iris\$Species=="setosa"));predict(w,x) w <- nrbm(rocLoss(x,iris\$Species=="setosa"));predict(w,x) w <- nrbm(fbetaLoss(x,iris\$Species=="setosa"));predict(w,x) ```

bmrm documentation built on May 2, 2019, 2:49 p.m.