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