public class SquaredError extends java.lang.Object implements Loss
The squared (L2) error is defined as: (y - F(x))**2 where y is the label and F(x) is the model prediction for features x.
Constructor and Description |
---|
SquaredError() |
Modifier and Type | Method and Description |
---|---|
static double |
gradient(double prediction,
double label)
Method to calculate the gradients for the gradient boosting calculation for least
squares error calculation.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
computeError, computeError, gradient
public static double gradient(double prediction, double label)
prediction
- Predicted label.label
- True label.