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

1-D minimization using Charalambous' method

Syntax

Description

srchcha is a linear search routine. It searches in a given direction to locate the minimum of the performance function in that direction. It uses a technique based on Charalambous' method.

srchcha(net,X,Pd,Tl,Ai,Q,TS,dX,gX,perf,dperf,delta,tol,ch_perf) takes these inputs,

net
Neural network
X
Vector containing current values of weights and biases
Pd
Delayed input vectors
Tl
Layer target vectors
Ai
Initial input delay conditions
Q
Batch size
TS
Time steps
dX
Search direction vector
gX
Gradient vector
perf
Performance value at current X
dperf
Slope of performance value at current X in direction of dX
delta
Initial step size
tol
Tolerance on search
ch_perf
Change in performance on previous step

and returns

a
Step size that minimizes performance
gX
Gradient at new minimum point
perf
Performance value at new minimum point
retcode
Return code that has three elements. The first two elements correspond to the number of function evaluations in the two stages of the search. The third element is a return code. These have different meanings for different search algorithms. Some might not be used in this function.

0
Normal

1
Minimum step taken

2
Maximum step taken

3
Beta condition not met
delta
New initial step size, based on the current step size
tol
New tolerance on search

Parameters used for the Charalambous algorithm are

alpha
Scale factor that determines sufficient reduction in perf
beta
Scale factor that determines sufficiently large step size
gama
Parameter to avoid small reductions in performance, usually set to 0.1
scale_tol
Parameter that relates the tolerance tol to the initial step size delta, usually set to 20

The defaults for these parameters are set in the training function that calls them. See traincgf, traincgb, traincgp, trainbfg, and trainoss.

Dimensions for these variables are

Pd
No x Ni x TS cell array
Each element P{i,j,ts} is a Dij x Q matrix.
Tl
Nl x TS cell array
Each element P{i,ts} is a Vi x Q matrix.
Ai
Nl x LD cell array
Each element Ai{i,k} is an Si x Q matrix.

where

Ni
=

net.numInputs
Nl
=

net.numLayers
LD
=

net.numLayerDelays
Ri
=

net.inputs{i}.size
Si
=

net.layers{i}.size
Vi
=

net.targets{i}.size
Dij
=

Ri * length(net.inputWeights{i,j}.delays)

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 traincgf network training function and the srchcha search function are to be used.

Create and Test a Network

Network Use

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

To prepare a custom network to be trained with traincgf, using the line search function srchcha,

  1. Set net.trainFcn to 'traincgf'. This sets net.trainParam to traincgf's default parameters.
  2. Set net.trainParam.searchFcn to 'srchcha'.

The srchcha function can be used with any of the following training functions: traincgf, traincgb, traincgp, trainbfg, trainoss.

Algorithm

srchcha locates the minimum of the performance function in the search direction dX, using an algorithm based on the method described in Charalambous (see reference below).

Reference

Charalambous, C., "Conjugate gradient algorithm for efficient training of artificial neural networks," IEEE Proceedings, Vol. 139, No. 3, June, 1992, pp. 301-310

See Also

srchbac, srchbre, srchgol, srchhyb


 Provide feedback about this page 

Previous page srchbre srchgol Next page

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