Train
Train
Train[net, data, options...] trains the neural net on the data. The data must be in NeuralNetData format.
Train[net, input, output, options...] trains the neural net on flat input/output lists. The data in the lists are partitioned according to the number of inputs/outputs in the net.
Train[net, filename, options...]trains the neural net on data contained in a Fann format data file
The options for the Train function are Epochs, ReportInterval, ShuffleInterval and MeanSquareError. When no options are given training will occur for one epoch (i.e. the net is trained once for each input/output pair) and the mean square error will be returned.
Epochs can be set to the number of epochs the net should be trained. MeanSquareError can be specified to stop training when the mean square error drops below the given value. If it is not set then training will take place for the number of epochs given.
The ReportInterval can be used to obtain the mean square error at the intervals. The mean square error is then returned as a list containing the epoch number and the mean square error at that time. It is in a form that can be displayed directly with ListPlot or LogListPlot. With the ShuffleInterval option the data is shuffled at every interval given. The ShuffleInterval changes the ReportInterval if it is not multiple of the ReportInterval. See the option for more details.
Note that the data, the properties of the neural net and the initial values of its weights all influence the training.
Train Default Options
Epochs
Epochs is an option of Train. When set it specifies the number of training epochs. If the MeanSquareError option is given to the train function and the mean square error is reached then training will stop before the number of epochs is reached. The default is to train for one epoch.
MeanSquareError
MeanSquareError is an option of Train. It can be specified to stop training when the mean square error drops below the given value. The default value is zero.
ReportInterval
ReportInterval is an option of Train. The option can be used to obtain the mean square error at the intervals. The mean square error is then returned as a list containing the epoch number and the mean square error at that time in a form that can be used with ListPlot or LogListPlot. The default is to return up to 100 mean square error values at regular intervals.
ShuffleInterval
ShuffleInterval is an option of Train. The option specifies that the data is shuffled at every interval given. ShuffleInterval changes the ReportInterval if it is not multiple of the ReportInterval. Shuffling can improve the training for some data but it can also increase the run time for the Train function. The default is not to shuffle the data.
Created by freegoldbar (September 16, 2004)