trait Loss extends Serializable
Trait for adding "pluggable" loss functions for the gradient boosting algorithm.
- Annotations
- @Since( "1.2.0" )
- Source
- Loss.scala
- Alphabetic
- By Inheritance
- Loss
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
gradient(prediction: Double, label: Double): Double
Method to calculate the gradients for the gradient boosting calculation.
Method to calculate the gradients for the gradient boosting calculation.
- prediction
Predicted feature
- label
true label.
- returns
Loss gradient.
- Annotations
- @Since( "1.2.0" )
Concrete Value Members
-
def
computeError(model: TreeEnsembleModel, data: RDD[LabeledPoint]): Double
Method to calculate error of the base learner for the gradient boosting calculation.
Method to calculate error of the base learner for the gradient boosting calculation.
- model
Model of the weak learner.
- data
Training dataset: RDD of org.apache.spark.mllib.regression.LabeledPoint.
- returns
Measure of model error on data
- Annotations
- @Since( "1.2.0" )
- Note
This method is not used by the gradient boosting algorithm but is useful for debugging purposes.