public class LogisticLoss extends Object
GenericLossFunction
The LogisticLoss
function implements log(1 + -exp(prediction*label))
for binary classification with label in {-1, 1}
Constructor and Description |
---|
LogisticLoss() |
Modifier and Type | Method and Description |
---|---|
static double |
derivative(double prediction,
double label)
Calculates the derivative of the loss function with respect to the prediction
|
static double |
loss(double prediction,
double label)
Calculates the loss depending on the label and the prediction
|
public static double loss(double prediction, double label)
prediction
- The predicted valuelabel
- The true valuepublic static double derivative(double prediction, double label)
prediction
- The predicted valuelabel
- The true valueCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.