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

One-step secant backpropagation

Syntax

Description

trainoss is a network training function that updates weight and bias values according to the one-step secant method.

trainoss(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 trainoss'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.searchFcn
'srchcha'

Name of line search routine to use

Parameters related to line search methods (not all used for all methods):

net.trainParam.scal_tol
20

Divide into delta to determine tolerance for linear search.
net.trainParam.alpha
0.001

Scale factor that determines sufficient reduction in perf
net.trainParam.beta
0.1

Scale factor that determines sufficiently large step size
net.trainParam.delta
0.01

Initial step size in interval location step
net.trainParam.gama
0.1

Parameter to avoid small reductions in performance, usually set to 0.1 (see srch_cha)
net.trainParam.low_lim
0.1

Lower limit on change in step size
net.trainParam.up_lim
0.5

Upper limit on change in step size
net.trainParam.maxstep
100

Maximum step length
net.trainParam.minstep
1.0e-6

Minimum step length
net.trainParam.bmax
26

Maximum step size

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

Network Use

You can create a standard network that uses trainoss with newff, newcf, or newelm. To prepare a custom network to be trained with trainoss,

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

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

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 trainoss network training function is to be used.

Create and test a network.

Here the network is trained and retested.

Algorithm

trainoss 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 from the new gradient and the previous steps and gradients, according to the following formula:

where gX is the gradient, X_step is the change in the weights on the previous iteration, and dgX is the change in the gradient from the last iteration. See Battiti (Neural Computation, Vol. 4, 1992, pp. 141-166) for a more detailed discussion of the one-step secant algorithm.

Training stops when any of these conditions occurs:

Reference

Battiti, R., "First and second order methods for learning: Between steepest descent and Newton's method," Neural Computation, Vol. 4, No. 2, 1992, pp. 141-166

See Also

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


 Provide feedback about this page 

Previous page trainlm trainr Next page

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