📄 sgnt_generating_online.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -