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

Create Elman backpropagation network

Syntax

Description

newelm(P,T,[S1 S2...S(N-l)],{TF1 TF2...TFNl}, BTF,BLF,PF,IPF,OPF,DDF) takes these arguments,

P
R x Q1 matrix of Q1 sample R-element input vectors
T
SN x Q2 matrix of Q2 sample SN-element input vectors
Si
Size of ith layer, for N-1 layers, default = [ ].
(Output layer size SN is determined from T.)
TFi
Transfer function of ith layer. (Default = 'tansig' for
hidden layers and 'purelin' for output layer.)
BTF
Backpropagation network training function (default = 'trainlm')
BLF
Backpropagation weight/bias learning function (default = 'learngdm')
PF
Performance function (default = 'mse')
IPF
Row cell array of input processing functions. (Default = {'fixunknowns','removeconstantrows','mapminmax'})
OPF
Row cell array of output processing functions. (Default = {'removeconstantrows','mapminmax'})
DDF
Data divison function (default = 'dividerand')

and returns an Elman network.

The training function BTF can be any of the backpropagation training functions such as trainlm, trainbfg, trainrp, traingd, etc.

The learning function BLF can be either of the backpropagation learning functions learngd or learngdm.

The performance function can be any of the differentiable performance functions such as mse or msereg.

Examples

Here is a series of Boolean inputs P, and another sequence T, which is 1 wherever P has two 1s in a row.

You want the network to recognize whenever two 1s occur in a row. First, arrange these values as sequences.

Next, create an Elman network with one hidden layer of ten neurons.

Then train the network and simulate it.

Algorithm

Elman networks consist of Nl layers using the dotprod weight function, netsum net input function, and the specified transfer function.

The first layer has weights coming from the input. Each subsequent layer has a weight coming from the previous layer. All layers except the last have a recurrent weight. All layers have biases. The last layer is the network output.

Each layer's weights and biases are initialized with initnw.

Adaption is done with trains, which updates weights with the specified learning function. Training is done with the specified training function. Performance is measured according to the specified performance function.

See Also

newff, newcf, sim, init, adapt, train, trains


 Provide feedback about this page 

Previous page newdtdnn newff Next page

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