| Neural Network Toolbox | |
| Provide feedback about this page |
BFGS quasi-Newton backpropagation
Syntax
Description
trainbfg is a network training function that updates weight and bias values according to the BFGS quasi-Newton method.
trainbfg(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 |
Initial input conditions |
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 trainbfg's training parameters, shown here with their default values:
Parameters related to line search methods (not all used for all methods):
trainbfg('info') returns useful information about this function.
Network Use
You can create a standard network that uses trainbfg with newff, newcf, or newelm. To prepare a custom network to be trained with trainbfg,
NET.trainFcn to 'trainbfg'. This sets NET.trainParam to trainbfg's default parameters.
NET.trainParam properties to desired values.
In either case, calling train with the resulting network trains the network with trainbfg.
Examples
Here is a problem consisting of inputs P and targets T to be solved with a network.
Here a feed-forward network is created with one hidden layer of 2 neurons.
Here the network is trained and tested.
Algorithm
trainbfg 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 dX is the search direction. The parameter a is selected to minimize the performance along the search direction. The line search function searchFcn is used to locate the minimum point. The first search direction is the negative of the gradient of performance. In succeeding iterations the search direction is computed according to the following formula:
where gX is the gradient and H is a approximate Hessian matrix. See page 119 of Gill, Murray, and Wright (Practical Optimization, 1981) for a more detailed discussion of the BFGS quasi-Newton method.
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
Gill, Murray, & Wright, Practical Optimization, 1981
See Also
newff, newcf, traingdm, traingda, traingdx, trainlm, trainrp, traincgf, traincgb, trainscg, traincgp, trainoss
| Provide feedback about this page |
![]() | trainb | trainbfgc | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |