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)
LossFunctioncomputeLoss in interface LossFunctiony - the labelf - the predictionpublic double computeGradient(double y, double f)
LossFunctioncomputeGradient in interface LossFunctiony - the labelf - the predictionCopyright © 2017 The Apache Software Foundation. All rights reserved.