|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Objectorg.apache.spark.mllib.tree.loss.SquaredError
public class SquaredError
:: DeveloperApi :: Class for squared error loss calculation.
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 Summary | |
|---|---|
SquaredError()
|
|
| Method Summary | |
|---|---|
static double |
gradient(double prediction,
double label)
Method to calculate the gradients for the gradient boosting calculation for least squares error calculation. |
| Methods inherited from class Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.spark.mllib.tree.loss.Loss |
|---|
computeError, computeError, gradient |
| Constructor Detail |
|---|
public SquaredError()
| Method Detail |
|---|
public static double gradient(double prediction,
double label)
prediction - Predicted label.label - True label.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||