💥1 概述
文章包含用于实现自适应识别和控制的在线顺序学习算法、元认知神经网络和前馈神经网络的代码。这些方法也用于解决分类和时间序列预测问题。
📚2 运行结果


 
 
部分代码:
%%%% IDENTIFICATION EXAMPLE 2 PART A ONE LAYER
%%%% EQUILIBRIUM STATES OF UNFORCED SYSTEM
 clc;clear;
 k=[1:200];
 f=@(x,y)(x*y*(x+2.5)/(1+x^2+y^2));
 difftanh=@(x)(sech(x));
NNclass=[2 20 1];
 in=NNclass(1);n1=NNclass(2);out=NNclass(3);
W1=normrnd(0,0.3,in+1,n1);                              %%%% Weight Initialization
 W2=zeros(n1+1,out);
eta=0.1; %%%% Learning Rate
points=1000
 b=normrnd(0,4,1,points);                                   %%%% Initial conditions seed
 a=normrnd(0,4,1,points);
 a_zero=[];b_zero=[];
 a_two=[];b_two=[];
 a_nah=[];b_nah=[];
 subplot(121);
 for j=1:length(b)                                       %%%% Training the network to different initial conditions
     yp=[b(j) a(j) zeros(1,length(k))];                  
     yphat=[b(j) a(j) zeros(1,length(k))];
    for i=3:length(k)+2
         u=0;
         yp(i)=f(yp(i-1),yp(i-2))+u;
         %%% NEURAL NETWORK
         % Forward Pass
         A1=[1 yp(i-1) yp(i-2)]*W1;
         y1=tanh(A1);
         A2=[1 y1]*W2;
         N=A2;
         % Identification Model Ouput
         yphat(i)=N+u;
         % Backward Pass
         e=-(yphat(i)-yp(i));
         del2=e;
         del1=difftanh(A1).*(del2*W2(2:end,:)');
         Jw2=[1 y1]'*del2;                               %%%% CRAY-DIENTS
         Jw1=[1 yp(i-1) yp(i-2)]'*del1;
         %Weight Updation
         W1=W1+eta*Jw1;
         W2=W2+eta*Jw2;
     end
🌈3 Matlab代码实现
🎉4 参考文献
[1]何儒汉,熊捷繁,熊明福.基于背景自适应学习的行人重识别算法研究[J/OL].计算机工程与应用:1-10[2022-12-20].http://kns.cnki.net/kcms/detail/11.2127.tp.20211202.1026.002.html










