public final class WeightedLogisticLossFunction extends Object implements LossFunction
LossFunction
.Constructor and Description |
---|
WeightedLogisticLossFunction()
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 WeightedLogisticLossFunction()
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 © 2016 The Apache Software Foundation. All rights reserved.