public class SquaredError extends 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 |
computeError(TreeEnsembleModel model,
RDD<LabeledPoint> data)
Method to calculate loss of the base learner for the gradient boosting calculation.
|
static double |
gradient(TreeEnsembleModel model,
LabeledPoint point)
Method to calculate the gradients for the gradient boosting calculation for least
squares error calculation.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcomputeError, gradientpublic static double gradient(TreeEnsembleModel model, LabeledPoint point)
model - Ensemble modelpoint - Instance of the training datasetpublic static double computeError(TreeEnsembleModel model, RDD<LabeledPoint> data)
model - Ensemble modeldata - Training dataset: RDD of LabeledPoint.