public class AbsoluteError extends Object implements Loss
The absolute (L1) error is defined as: |y - F(x)| where y is the label and F(x) is the model prediction for features x.
| Constructor and Description |
|---|
AbsoluteError() |
| 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
absolute 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.