public interface LossFunc extends Serializable
Modifier and Type | Method and Description |
---|---|
LossFunc |
clone() |
double |
getDeriv(double pred,
double y)
Computes the first derivative of the loss function.
|
double |
getDeriv2(double pred,
double y)
Computes the second derivative of the getLoss function.
|
double |
getDeriv2Max()
Returns an upper bound on the maximum value of the second derivative.
|
double |
getLoss(double pred,
double y)
Computes the loss for some problem.
|
double getLoss(double pred, double y)
pred
- the predicted value in (-Infinity, Infinity)y
- the true value in (-Infinity, Infinity)double getDeriv(double pred, double y)
pred
- the predicted score in (-Infinity, Infinity)y
- the true value in (-Infinity, Infinity)double getDeriv2(double pred, double y)
pred
- the predicted score in (-Infinity, Infinity)y
- the true value in (-Infinity, Infinity)double getDeriv2Max()
Double.NaN
is a valid
result. It is also possible for 0
and
Double.POSITIVE_INFINITY
to be valid results, and must be checked
for.getDeriv2(double, double)
LossFunc clone()
Copyright © 2017. All rights reserved.