| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Neural Network Toolbox |
| Contents | Index |
BFGS quasi-Newton backpropagation
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.
You can create a standard network that uses trainbfg with newff, newcf, or newelm. To prepare a custom network to be trained with trainbfg,
In either case, calling train with the resulting network trains the network with trainbfg.
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.
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:
Gill, Murray, & Wright, Practical Optimization, 1981
newff, newcf, traingdm, traingda, traingdx, trainlm, trainrp, traincgf, traincgb, trainscg, traincgp, trainoss
| Provide feedback about this page |
![]() | trainb | trainbfgc | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |