public class SquaredLoss$ extends Object implements PartialLossFunction
GenericLossFunction
The SquaredLoss
function implements 1/2 (prediction - label)^2
Modifier and Type | Field and Description |
---|---|
static SquaredLoss$ |
MODULE$
Static reference to the singleton instance of this Scala object.
|
Constructor and Description |
---|
SquaredLoss$() |
Modifier and Type | Method and Description |
---|---|
double |
derivative(double prediction,
double label)
Calculates the derivative of the
PartialLossFunction |
double |
loss(double prediction,
double label)
Calculates the loss depending on the label and the prediction
|
public static final SquaredLoss$ MODULE$
public double loss(double prediction, double label)
loss
in interface PartialLossFunction
prediction
- label
- public double derivative(double prediction, double label)
PartialLossFunction
derivative
in interface PartialLossFunction
prediction
- label
- Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.