public interface Loss
extends scala.Serializable
| Modifier and Type | Method and Description | 
|---|---|
| double | computeError(double prediction,
            double label)Method to calculate loss when the predictions are already known. | 
| double | computeError(org.apache.spark.mllib.tree.model.TreeEnsembleModel model,
            RDD<LabeledPoint> data)Method to calculate error of the base learner for the gradient boosting calculation. | 
| double | gradient(double prediction,
        double label)Method to calculate the gradients for the gradient boosting calculation. | 
double computeError(org.apache.spark.mllib.tree.model.TreeEnsembleModel model,
                    RDD<LabeledPoint> data)
model - Model of the weak learner.data - Training dataset: RDD of LabeledPoint.double computeError(double prediction,
                    double label)
prediction - Predicted label.label - True label.double gradient(double prediction,
                double label)
prediction - Predicted featurelabel - true label.