train(self,
training_examples,
validation_examples,
stopping_criteria,
learning_rate,
momentum)
| source code
|
Train the neural network to recognize particular examples.
Arguments:
o training_examples -- A list of TrainingExample classes that will
be used to train the network.
o validation_examples -- A list of TrainingExample classes that
are used to validate the network as it is trained. These examples
are not used to train so the provide an independent method of
checking how the training is doing. Normally, when the error
from these examples starts to rise, then it's time to stop
training.
o stopping_criteria -- A function, that when passed the number of
iterations, the training error, and the validation error, will
determine when to stop learning.
o learning_rate -- The learning rate of the neural network.
o momentum -- The momentum of the NN, which describes how much
of the prevoious weight change to use.
|