JMSLTM Numerical Library 4.0

com.imsl.datamining.neural
Interface Trainer

All Superinterfaces:
Serializable
All Known Implementing Classes:
EpochTrainer, LeastSquaresTrainer, QuasiNewtonTrainer

public interface Trainer
extends Serializable

Interface implemented by classes used to train a network. The method train is 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.


Method Summary
 double[] getErrorGradient()
          Returns the value of the gradient of the error function with respect to the weights.
 int getErrorStatus()
          Returns the error status.
 double getErrorValue()
          Returns the value of the error function minimized by the trainer.
 void train(Network network, double[][] xData, double[][] yData)
          Trains the neural network using supplied training patterns.
 

Method Detail

getErrorGradient

public double[] getErrorGradient()
Returns the value of the gradient of the error function with respect to the weights.

Returns:
A double array, 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, null is returned.

getErrorStatus

public int getErrorStatus()
Returns the error status.

Returns:
An int specifying the error. If there was no error, zero is returned. A non-zero return indicates a potential problem with the trainer.

getErrorValue

public double getErrorValue()
Returns the value of the error function minimized by the trainer.

Returns:
A double indicating the final value of the error function from the last training. Before training, NaN is returned.

train

public void train(Network network,
                  double[][] xData,
                  double[][] yData)
Trains the neural network using supplied training patterns.

Parameters:
network - A Network object, which is the Network to be trained.
xData - A double matrix containing the input training patterns. The number of columns in xData must equal the number of nodes in the input layer. Each row of xData contains a training pattern.
yData - A double matrix containing the output training patterns. The number of columns in yData must equal the number of perceptrons in the output layer. Each row of yData contains a training pattern.

JMSLTM Numerical Library 4.0

Copyright 1970-2006 Visual Numerics, Inc.
Built June 1 2006.