@DefaultImplementation(value=SquaredErrorLossFunction.class) public interface LossFunction
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.
|
double computeLoss(double y, double f)
y
- the labelf
- the predictiondouble computeGradient(double y, double f)
y
- the labelf
- the predictionCopyright © 2017 The Apache Software Foundation. All rights reserved.