A list,
1 Elman network features
Elman neural network is a kind of typical dynamic recursive neural network, which is based on the basic structure of BP network, in the add a layer, hidden layer as a step delay operator, achieve the purpose of memory, which make the system have the ability to adapt to the time-varying characteristics, to enhance the global stability of the network, it is better than type feedforward neural network has more computing power, It can also be used to solve the problem of fast optimization.
2 Elman network structure
Elman neural network is a typical feedback neural network model which is widely used. Generally divided into four layers: input layer, hidden layer, undertake layer and output layer. The connection of input layer, hidden layer and output layer is similar to feedforward network. The input layer element only plays the role of signal transmission, the output layer element plays the role of weighting. Hidden layer element has linear and nonlinear excitation function, usually Signmoid nonlinear function. The continuity layer is used to remember the previous output value of hidden layer element, which can be regarded as a delay operator with one-step delay. The output of the hidden layer connects itself to the input of the hidden layer through the delay and storage of the layer, which makes it sensitive to the historical data. The addition of the internal feedback network increases the ability of the network itself to deal with dynamic information, so as to achieve the purpose of dynamic modeling. Its structure is shown in Figure 1 below.
The mathematical expression of its network is as follows:
3 Differences between Elman network and BP network
It is a dynamic feedback network, which can internally feedback, store and use the output information of the past time. It can not only realize the modeling of static system, but also realize the mapping of dynamic system and directly reflect the dynamic characteristics of the system. It is better than BP neural network in terms of computing power and network stability.
4 Elman network shortcomings
Like BP neural network, the algorithm is based on gradient descent method, which will have the disadvantages of slow training speed and easy to fall into the local minimum point, and the training of neural network is difficult to achieve the global optimal.
Ii. Source code
**%% clear the environment variable CLC; clear all close all nntwarn off; %% data load data; a=data; Select training data and test datafor i=1:6
p(i,:)=[a(i,:),a(i+1,:),a(i+2:)]; P_train =p(1:5, :); % train output t_train=a(4:8, :); P_test =p(6, :); T_test =a(9, :); % transpose p_train=p_train to fit the network structure';
t_train=t_train';
p_test=p_test'; %% network establishment and training % use of the cycle, set different hidden layer neuron number nn=[7 11 14 18];
for i=1:4
threshold=[0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1;0 1]; Net =newelm(threshold,[nn(I),3] and {'tansig'.'purelin'}); % Set the network training parameter net.trainparam.epochs=1000;
net.trainparam.show=20; Net =init(net); % Elman net= net (net,p_train,t_train); % y=sim(net,p_test); % error(I,:)=y'-t_test;
end**
Copy the code
3. Operation results
Fourth, note
Version: 2014 a