public class SquaredError extends java.lang.Object implements LossFunction
| Constructor and Description |
|---|
SquaredError() |
| Modifier and Type | Method and Description |
|---|---|
double |
derivative(double pred,
double actual)
The derivative of the loss with respect to the predicted value
|
java.lang.String |
globalInfo()
This will return a string describing the classifier.
|
double |
loss(double pred,
double actual)
Returns the loss.
|
public java.lang.String globalInfo()
public double loss(double pred,
double actual)
loss in interface LossFunctionpred - predicted target valueactual - actual target valuepublic double derivative(double pred,
double actual)
derivative in interface LossFunctionpred - predicted target valueactual - actual target value