| Neural Network Toolbox | |
| Provide feedback about this page |
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 |
net |
Trained network | |
TR |
Training record of various values over each epoch | |
Each argument trainV, valV, and testV is a structure of these fields:
Training occurs according to trainrp's training parameters, shown here with their default values:
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,
net.trainFcn to 'trainrp'. This sets net.trainParam to trainrp's default parameters.
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.
Here the network is trained and retested.
net.trainParam.epochs = 50; net.trainParam.show = 10; net.trainParam.goal = 0.1; net = train(net,p,t); a = sim(net,p)
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:
epochs (repetitions) is reached.
time is exceeded.
goal.
min_grad.
max_fail times since the last time it decreased (when using validation).
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 |
![]() | trainr | trains | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |