public interface Trainer extends Serializable
trainis used to adjust the weights in a network to best fit a set of observed data. After a network is trained, the other methods in this interface can be used to check the quality of the fit.
|Modifier and Type||Method and Description|
Returns the value of the gradient of the error function with respect to the weights.
Returns the error status.
Returns the value of the error function minimized by the trainer.
Trains the neural network using supplied training patterns.
doublearray, the length of the number of weights, containing the value of the gradient of the error function with respect to the weights at the computed optimal point. Before training,
intspecifying the error. If there was no error, zero is returned. A non-zero return indicates a potential problem with the trainer.
doubleindicating the final value of the error function from the last training. Before training,
void train(Network network, double xData, double yData)
Networkobject, which is the
Networkto be trained.
doublematrix containing the input training patterns. The number of columns in
xDatamust equal the number of nodes in the
InputLayer. Each row of
xDatacontains a training pattern.
doublematrix containing the output training patterns. The number of columns in
yDatamust equal the number of
Perceptrons in the
OutputLayer. Each row of
yDatacontains a training pattern.
Copyright © 1970-2015 Rogue Wave Software
Built October 13 2015.