The pattern file of a Backpropagation Net contains the input and target patterns for the net. The patterns should contain ASCII characters that are defined in the net's conversion file. The number of patterns can be changed freely.
The length of an input pattern must be the same as the number of neurons in the net's input neuron layer. The length of a target pattern must be the same as the number of neurons in the net's output neuron layer.
The general structure of a pattern file is as follows:
In the first line:
Number of patterns
In the second line:
Length of input patterns (same as number of neurons in input layer)
In the third line:
Length of target patterns (same as number of neurons in output layer)
Each following line:
The input pattern [whitespace] the target pattern
Below you see the pattern file towns.pat that is used in the BPN application. It contains 15 patterns (first line). Each input pattern consists of 10 ASCII characters (second line) and each target pattern consists of 7 characters (third line).
Note: A pattern file must be read after the connectLayers() method had been called.