rsomsimv02.m

来自「a neural network,Recursive SOM and Marge」· M 代码 · 共 83 行

M
83
字号
%   Simulating a RSOM on an Artificial Time Series%   Network type: SOMSD, training for 10000 epochs%%   ---------------------------------------------------------%   Amir Reza Saffari Azar Alamdari%   http://www.ymer.org/main.htm , amir@ymer.org%   ---------------------------------------------------------close allclear allclc%% InitializingCurVersion  = 'V02';SimName     = 'RSOMSim';ResultDir   = ['Results/' , SimName , CurVersion , '/'];ResultFile  = [SimName , CurVersion];if exist(ResultDir) ~= 7        mkdir(ResultDir)    endaddpath(genpath(cd))DataVersion = 'V01';DataName    = 'Artif';load(['Results/' , DataName , DataVersion , '/' , DataName , DataVersion])disp([ResultFile , '...'])%% Creating RSOMRSOMSize    = [6 , 6];Net = CreateNetRSOM(1 , RSOMSize , 'RSOMType' , 'SOMSD' , 'RSOMNeiFunP' , 2 , 'RSOMUnSLFun' , 'RSOMHebbV01' , 'ShowMessages' , 0);%% Training RSOMEpoch       = 1;MaxEpoch    = 100;Net.State.MaxEpoch  = MaxEpoch;ticwhile Epoch <= MaxEpoch        Net.State.Epoch = Epoch;           disp(['Epoch: ' , num2str(Epoch)])        I   = DataTrain;            Net = SimNetRSOM(Net , I);        Net.State.RSOMState = zeros(size(Net.State.RSOMState , 1) , 1);        Epoch   = Epoch + 1;endtoc%% SimulatingNet.Learn.RSOMUnSLFun   = 'None';disp('Simulating time series ...')I   = [DataTrain DataTest];Net = SimNetRSOM(Net , I);%% SavingMatlabVer   = version;if MatlabVer(1) == '7'    save([ResultDir , ResultFile] , 'Net' , '-V6')else    save([ResultDir , ResultFile] , 'Net')enddisp('Done.')

⌨️ 快捷键说明

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