public class SquaredLoss extends Object implements PartialLossFunction
GenericLossFunction
The SquaredLoss
function implements 1/2 (prediction - label)^2
Constructor and Description |
---|
SquaredLoss() |
Modifier and Type | Method and Description |
---|---|
static double |
derivative(double prediction,
double label)
Calculates the derivative of the
PartialLossFunction |
static double |
loss(double prediction,
double label)
Calculates the loss depending on the label and the prediction
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
derivative, loss
public static double loss(double prediction, double label)
prediction
- label
- public static double derivative(double prediction, double label)
PartialLossFunction
prediction
- label
- Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.