sgnt_generating_online.asv

来自「ISGNN是对SGNN(self-generated neural networ」· ASV 代码 · 共 43 行

ASV
43
字号
function [Node] = sgnt_generating_online(y1,m)
% Generating A Self-Generating Neural Tree for traning a SGNN
% Copyright By Li Aiguo in 15/12/2004
%Input: y1: training set
%       m:  input vector dimision
%Ouput: node: a SGNT
%   node(j): (wj1,...,wjm);cj; Father_ptr; FirstChild_ptr; NextSibling_ptr  

%*****************************************************************************
% [nr,nc]= size(y1);
% if nr< nc  y1=y1'; end

%**************************************************************
alfa = 0;
% Generating a SGNT named node
%**************************************************************
% generating a root of the tree
 for k=1:1:m  node(1,k)= y1(1,k);   end
 node(1,m+1)= 1;
 node(1,m+2)= 0;
 node(1,m+3)= 0;
 node(1,m+4)= 0;
    
%****************************************************
% Generating the tree
[nr,nc]= size(y1);
 
 for i=2:1:nr 
      s = y1(i,1:m);
      node = sgnt_insert(node,s, alfa);
      % vertical placed well   
       node = sgnt_vhp_1(node);
      % HWP Purning  HWP(Horizontally Well Placed) d(n,np)<=d(n,ns)
      % node = sgnt_hwp_1(node);
        %merge
     node = sgnt_merge_1(node, alfa);
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % HWP Purning  HWP(Horizontally Well Placed) d(n,np)<=d(n,ns)
    % node = sgnt_hwp_1(node);
   
end
 
Node = node  

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?