public final class LogisticLossFunction extends Object implements LossFunction
LossFunction
.Constructor and Description |
---|
LogisticLossFunction()
Trivial constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
computeGradient(double y,
double f)
Computes the gradient with respect to f, if y is the true label.
|
double |
computeLoss(double y,
double f)
Computes the loss incurred by predicting f, if y is the true label.
|
String |
toString() |
@Inject public LogisticLossFunction()
public double computeLoss(double y, double f)
LossFunction
computeLoss
in interface LossFunction
y
- the labelf
- the predictionpublic double computeGradient(double y, double f)
LossFunction
computeGradient
in interface LossFunction
y
- the labelf
- the predictionCopyright © 2017 The Apache Software Foundation. All rights reserved.