Documentation /  Neural Networks /  Training Feedforward and Radial Basis Function Networks /

Options Controlling Training Results PresentationWriting Your Own Training Algorithms

7.8 The Training Record

All neural network training functions, with the exception of HopfieldFit, return lists with two components. The first element is the trained network and the second element is a training record, containing information logged during the training. The training record can be used to graphically illustrate the training, using the command NetPlot. The command works somewhat differently depending on which kind of network it is applied to. See the description in connection to each type of neural network. Here it will be shown how you can extract information directly from the training record.

First, some test data and a demonstration network are needed. Although an FF network is used in the example, training records from all other neural network models can be handled in the same way.

Load the Neural Networks package and test the data, then initialize and train an FF network.

In[1]:=

In[2]:=<<onedimfunc.dat;
fdfrwrd=InitializeFeedForwardNet[x,y,{4}];
{fdfrwrd2,fitrecord}=NeuralFit[fdfrwrd,x,y,10, CriterionPlotRuleFalse];

Look at the training record.

In[5]:=

Out[5]=

The head of the training record depends on the type of neural network training it describes. For FF and RBF networks, trained with NeuralFit, the head is NeuralFitRecord.

The first component of the training record contains a copy of the trained network. The second component is a list of rules. The left sides of the rules are used as pointers indicating different information.

FilledSmallCircleReportFrequency indicates the value of this option when the network was trained. That is, it indicates the interval of training iterations at which the information is logged in the rules that follow.

FilledSmallCircleCriterionValues points at a list containing the performance index after each iteration. It can easily be extracted and plotted.

FilledSmallCircleCriterionValidationValues contains a list of the performance index on validation data. Note that this only holds if validation data was submitted in the call, and that can only be done with the NeuralFit command. See Section 7.5, Regularization and Stopped Search for more information.

FilledSmallCircleParameterRecord contains a list of the parameters used during the training. The elements in the list have the same structure as the first element of the neural network model.

With these specifications you can extract and use the intermediate results of the training in any way you like.

Extract the criterion decrease and plot it.

In[6]:=

Extract the list of parameters versus training iterations and check the length of the list.

In[7]:=

Out[8]=

The elements in the parameter list have the same structure as the parameter structure in the network. This means that the parameters at some stage of the training can be easily obtained by inserting the parameter values in the network. Suppose you want to obtain the network model you had after five training iterations. Then you have to extract the sixth element (recall that the initial parameters are at the first position of the list) and put it at the first position of the network.

Find the model after the fifth iteration by putting in the parameters obtained using ParameterRecord.

In[9]:=

Out[9]=

The structure of the network is the same as before; only the values of the parameters have been changed.

Check the structure of the network.

In[10]:=

Out[10]=

Options Controlling Training Results PresentationWriting Your Own Training Algorithms


Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information