public class LogLoss extends Object implements Loss
The log loss is defined as: 2 log(1 + exp(-2 y F(x))) where y is a label in {-1, 1} and F(x) is the model prediction for features x.
Constructor and Description |
---|
LogLoss() |
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 loss gradients for the gradient boosting calculation for binary
classification
The gradient with respect to F(x) is: - 4 y / (1 + exp(2 y F(x)))
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
computeError, gradient
public 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
.