Package com.imsl.datamining.neural
Interface QuasiNewtonTrainer.Error
- All Superinterfaces:
Serializable
- Enclosing class:
- QuasiNewtonTrainer
Error function to be minimized by trainer.
This trainer attempts to solve the problem
$$\min_{w} \sum_{i=0}^{n-1} e(y_i, \hat{y}_i)$$
where w are the weights, n is the number of training patterns,
\(y_i\) is a training target output and
\(\hat{y}_i\) is its forecast value.
This interface defines the function \(e(y, \hat{y})\) and its derivative with respect to its computed value, \(de/d\hat{y}\).
-
Method Summary
Modifier and TypeMethodDescriptiondoubleerror(double[] computed, double[] expected) Returns the contribution to the error from a single training output target.double[]errorGradient(double[] computed, double[] expected) Returns the derivative of the error function with respect to the forecast output.
-
Method Details
-
error
double error(double[] computed, double[] expected) Returns the contribution to the error from a single training output target. This is the function \(e(y_i, \hat{y}_i)\).- Parameters:
computed- Adoublerepresenting the computed value.expected- Adoublerepresenting the expected value.- Returns:
- A
doublerepresenting the contribution to the error from a single training output target.
-
errorGradient
double[] errorGradient(double[] computed, double[] expected) Returns the derivative of the error function with respect to the forecast output.- Parameters:
computed- Adoublerepresenting the computed value.expected- Adoublerepresenting the expected value.- Returns:
- A
doublerepresenting the derivative of the error function with respect to the forecast output.
-