|
4.1.2 PerceptronFit
The command PerceptronFit is used to train a perceptron. It can be called with an already-existing perceptron model that is then trained, or it can be called with only data, in which case a perceptron will first be initialized. If the number of iterations is not specified, it will assume a default value of 100 or stop sooner when all patterns are correctly classified.





Train a perceptron network.
PerceptronFit returns a list containing two elements. The first element is the trained perceptron and the second is an object of type PerceptronRecord, which contains information of the training session. It can be used to evaluate the quality of the training using the command NetPlot. The structure of the training record is explained in Section 7.8, The Training Record.
An existing perceptron can be submitted for more training by setting perceptron equal to the perceptron or its training record. The advantage of submitting the training record is that the information about the earlier training is combined with the additional training.
During the training, intermediate results are displayed in a separate notebook, which is created automatically. After each training iteration the number of misclassified training patterns is displayed together with the iteration number. At the end of the training this information is shown in a plot. By changing the options, as described in Section 7.7, Options Controlling Training Results Presentation, you can change or switch off this information about the training.
PerceptronFit takes the following options.

Options of PerceptronFit.
If StepLength Automatic then it is set according to Eq. (2.6) in Section 2.4, The Perceptron. That default value is good for a large variety of problems. You can, however, supply any other positive numerical value.
The options CriterionPlot, CriterionLog, CriterionLogExtN, ReportFrequency, and MoreTrainingPrompt influence the way the results of PerceptronFit are presented and they are similar to the other training commands in the Neural Networks package. They are described in Section 7.7, Options Controlling Training Results Presentation.
A derived perceptron can be applied to new input vectors using function evaluation.

Function evaluation of a perceptron network.
The input argument x can be a vector containing one input vector or a matrix containing one input vector on each row.
|