📄 demosompls.m
字号:
function DemoSOMPLS;
%
clear
close all
% make a copy of the parameter file
disp('copying demo-parameters for the NIR data set to SetParamsModel.m')
!copy SPMSOMPLS.m SetParamsModel.m
% build first a BDK model on basis of the NIR data set
%
Ninit=1; % just one random initialisation of the network weights
% note that the predifined division in training and test
% set is used.
PercTrain=0; % here ignored, because training and test set are already defined
[PerfTrain,PerfTest,BestBDK,MLKP] = MakeModel(Ninit,PercTrain);
disp(' ')
disp('the displayed RMSE values correspond to Ethanol, Water and Iso-Propanol')
%
% PerfTrain contains the percentage correct (for classification) or the total
% RMSEP value for the training set
%
% PerfTest contains the percentage correct (for classification) or the total
% RMSEP value for the test set
%
% BestBDK is a Matlab struct containing all the essentials for the model
%
% MLKP contains the complete parameter block for the BDK model
%
%
% start a quick analysis of the content of BDK
AnalyseBDK(BestBDK,MLKP);
disp(' ')
disp('!!! hit a key to continue !!!')
pause
close all
%
% figure(1) displays the weights of the input map
%
% figure(2) shows in colour the class membership (embedded in the output map)
%
% figure(3) depicts a correlation image between input and output map
%
%
% now make the SOMPLS model
%
NCrossVal = 1; % apply just 1 crossvalidation run
NPercCV = 68; % divide the original training set in 68% (cross validation training set)
% and 33% crossvalidation test set
disp(' ')
disp('Please wait a minute before SOMPLS is optimised')
[PerfTrain,PerfTest,NBestSOMPLS,NMLKP,OPT] = SOMPLSCrossVal(NCrossVal,NPercCV,BestBDK);
disp(' ')
disp('the displayed RMSE values correspond to Ethanol, Water and Iso-Propanol')
%
% analyse the SOMPLS model
%
disp(' ')
disp('!!! hit a key to continue !!!')
pause
AnalyseSOMPLS(BestBDK,NBestSOMPLS,MLKP,OPT,1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -