Neural Network Toolbox™ Previous page   Next Page 
trainrp
 Provide feedback about this page

Resilient backpropagation

Syntax

Description

trainrp is a network training function that updates weight and bias values according to the resilient backpropagation algorithm (Rprop).

trainrp(net,TR,trainV,valV,testV) takes these inputs,

net
Neural network
TR
Initial training record created by train
trainV
Training data created by train
valV
Validation data created by train
testV
Test data created by train

and returns

net
Trained network
TR
Training record of various values over each epoch

Each argument trainV, valV, and testV is a structure of these fields:

X
N x TS cell array of inputs for N inputs and TS time steps. X{i,ts} is an Ri x Q matrix for the ith input and TS time step.
Xi
N x Nid cell array of input delay states for N inputs and Nid delays. Xi{i,j} is an Ri x Q matrix for the ith input and jth state.
Pd
N x S x Nid cell array of delayed input states.
T
NoxTS cell array of targets for No outputs and TS time steps. T{i,ts} is an Si x Q matrix for the ith output and TS time step.
Tl
Nl x TS cell array of targets for Nl layers and TS time steps. Tl{i,ts} is an Si x Q matrix for the ith layer and TS time step.
Ai
Nl x TS cell array of layer delays states for Nl layers, TS time steps. Ai{i,j} is an Si x Q matrix of delayed outputs for layer i, delay j.

Training occurs according to trainrp's training parameters, shown here with their default values:

net.trainParam.epochs
100

Maximum number of epochs to train
net.trainParam.show
25

Epochs between displays (NaN for no displays)
net.trainParam.showCommandLine
0

Generate command-line output
net.trainParam.showWindow
1

Show training GUI
net.trainParam.goal
0

Performance goal
net.trainParam.time
inf

Maximum time to train in seconds
net.trainParam.min_grad
1e-6

Minimum performance gradient
net.trainParam.max_fail
5

Maximum validation failures
net.trainParam.lr
0.01

Learning rate
net.trainParam.delt_inc
1.2

Increment to weight change
net.trainParam.delt_dec
0.5

Decrement to weight change
net.trainParam.delta0
0.07

Initial weight change
net.trainParam.deltamax
50.0

Maximum weight change

trainrp('info') returns useful information about this function.

Network Use

You can create a standard network that uses trainrp with newff, newcf, or newelm.

To prepare a custom network to be trained with trainrp,

  1. Set net.trainFcn to 'trainrp'. This sets net.trainParam to trainrp's default parameters.
  2. Set net.trainParam properties to desired values.

In either case, calling train with the resulting network trains the network with trainrp.

Examples

Here is a problem consisting of inputs p and targets t to be solved with a network.

A two-layer feed-forward network is created. The network's input ranges from [0 to 10]. The first layer has two tansig neurons, and the second layer has one logsig neuron. The trainrp network training function is to be used.

Create and test a network.

Here the network is trained and retested.

See newff, newcf, and newelm for other examples.

Algorithm

trainrp can train any network as long as its weight, net input, and transfer functions have derivative functions.

Backpropagation is used to calculate derivatives of performance perf with respect to the weight and bias variables X. Each variable is adjusted according to the following:

where the elements of deltaX are all initialized to delta0, and gX is the gradient. At each iteration the elements of deltaX are modified. If an element of gX changes sign from one iteration to the next, then the corresponding element of deltaX is decreased by delta_dec. If an element of gX maintains the same sign from one iteration to the next, then the corresponding element of deltaX is increased by delta_inc. See Riedmiller, Proceedings of the IEEE International Conference on Neural Networks (ICNN), San Francisco, 1993, pp. 586 to 591.

Training stops when any of these conditions occurs:

Reference

Riedmiller, Proceedings of the IEEE International Conference on Neural Networks (ICNN), San Francisco, 1993, pp. 586-591

See Also

newff, newcf, traingdm, traingda, traingdx, trainlm, traincgp, traincgf, traincgb, trainscg, trainoss, trainbfg


 Provide feedback about this page 

Previous page trainr trains Next page

 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS