The structure of a pattern file

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).

15

10

7

Bonn000000 Germany

Brasilia00 Brasil0

Brussels00 Belgium

Helsinki00 Finland

London0000 England

Madrid0000 Spain00

Moscow0000 Russia0

New0Delhi0 India00

Oslo000000 Norway0

Paris00000 France0

Rome000000 Italy00

Stockholm0 Sweden0

Tokyo00000 Japan00

Vienna0000 Austria

Washington USA0000

Note: A pattern file must be read after the connectLayers() method had been called.

Neural Net Components in an Object Oriented Class Structure