📄 art2a_e_linear.m
字号:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the implementation of fuzzy ART1 netrual network,some parameters are defined in main function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function [y,flag1]=ART2A_E_linear(x) % x:the input feature vector, y:the output vector of the out layer
global rou belta num_in_node num_out_node mode_vec p;
low=[0 0.1 0.1 0 0.5 0 0]; % % 用线性方法归一化 snr=8db
up=[35 2.5 0.45 1.2 6.5 5000 0.4];
%low=[0 0 0.1 0 0 0 0]; % % 用线性方法归一化 snr=15db
%up=[40 2 0.5 1 0.28 25 1.3];
% low=[0 0 0.1 0 0]; % % 用线性方法归一化 snr=15db
% up=[55 2.2 0.45 1.2 5.1];
%low=[0 0 0 0 0]; % % 用线性方法归一化 snr=8db xiaobo 5cen
%up=[4 0.25 0.07 0.0006 0.0010];
%low=[0 0 0 0 0]; % % 用线性方法归一化 snr=8db xiaobo 5cen
%up=[4 0.25 0.06 0.0006 0.0010];
%low=[0 0 0 0 0 0 0 0 0]; % % 用线性方法归一化 snr=8db xiaobo 9ce
%up=[4.5 0.25 0.07 0.00045 0.0012 0.25 0.07 0.00045 0.0012];
%low=[1 0.45]; % % 用线性方法归一化 snr=8db box
%up=[1.5 0.9];
%low=[1.45 0.45]; % % 用线性方法归一化 snr=15db box
%up=[1.5 0.9];
y=zeros(1,num_out_node);
flag1=1;
layer_in=x./(up-low)+1-up./(up-low); % the normalization of the input feature vector
%layer_in=layer_in./max(layer_in);
%layer_in=x./50;
%% the stage of learning
if p>=1
for i=1:p;
closeness(i)=sqrt(sum((layer_in-mode_vec(i,:))*(layer_in-mode_vec(i,:))')); %compute the closeness degree of each mode vector
end
[val,pos]=min(closeness);
n=1-sqrt(sum((layer_in-mode_vec(pos,:))*(layer_in-mode_vec(pos,:))'))/sqrt(num_in_node);
if n>=rou;
y(pos)=1;
mode_vec(pos,:)=mode_vec(pos,:)+belta*(layer_in-mode_vec(pos,:));
else
%if p<=99;
% if p<=499
if p<=1199;
y(p+1)=1;
mode_vec(p+1,:)=layer_in;
p=p+1;
%elseif p==100;
% elseif p==500
elseif p==1200;
flag1=0;
end
end
end
if p==0
mode_vec(1,:)=layer_in;
y(1)=1;
p=p+1;
end
return;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -