亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? polydemo.m

?? PLS_Toolbox是用于故障檢測與診斷方面的matlab工具箱
?? M
字號:
echo off
%POLYDEMO Demonstrates the POLYPLS and POLYPRED functions
echo on
%
% This is a demonstration of the polypls and polypred functions in
% the PLS_Toolbox.  It uses some process I/O data to build a
% nonlinear PLS model and compares it to a linear PLS model.
%
echo off
%Copyright Eigenvector Research, Inc. 1991-98
%Modified bmw 2/94, 2/97
%Checked on MATLAB 5 by BMW
%Modified bmw 3/98
echo on

% Lets start by loading the data

load pol_data

% We now have some calibration data (caldata) for building
% a model and some data we can test it with (testdata).
% We can plot out the calibration data and take a look at it.
pause

echo off
[m,n] = size(caldata);
plot(1:m,caldata(:,1),1:m,caldata(:,2),'--r')
title('Process Input (solid) and Output (dashed) Data for Calibration')
xlabel('Sample Number (time)')
ylabel('Process Input and Output')
pause
echo on

% What we want to do is build a model that relates the past
% values of the input to the current output.  As usual, we
% will start by scaling the data.

[acaldata,mcal,scal] = auto(caldata);
pause

% Now we can use the writein2 function to rewrite the data file
% into the diagonal format used in Finite Impulse Response (FIR)
% models.  In this case we have to chose how many samples into
% the past we will look.  It turns out that 6 is a good number
% for this data set.

[ucal,ycal] = writein2(acaldata(:,1),acaldata(:,2),6);
pause

% We can now use the polypls and regular pls functions to 
% build models that relate the input ucal to the output ycal.
% We must chose the number of latent variables to consider
% and the order of the polynomial to be used in the inner
% relation in the polypls function.  In this case I'll choose
% 5 and 2, respectively.  Lets do the nonlinear model first

[PP,QP,WP,TP,UP,bp,ssqp] = polypls(ucal,ycal,5,2);

% And now the linear model

[B,SSQ,P,Q,W,T,U,BIN] = pls(ucal,ycal,5);

% And we can also do polynomial regression
pause

[um,un] = size(ucal);
upoly = [ucal.^2 ucal ones(um,1)];
polymod = upoly\ycal;

% and of course polynomical pcr

[uu,ss,vv] = svd(ucal'*ucal/(um-1));
uu = ucal*vv(:,1:5);
pcrmod = [uu.^2 uu ones(um,1)]\ycal;
pause

% As you can see, the linear model does not account for as much
% of the variance in the y-block as the nonlinear model.
pause

% Now we will use the polypred and plspred functions with the
% models and compare the results to the actual data.  I'll
% choose 3 latent variables in for each model.  In practice
% we would have to obtain this through cross-validation, but 
% in this case I happen to know that 3 LVs will be about right.

ylin = ucal*B(3,:)';
ynon = polypred(ucal,bp,PP,QP,WP,4);
ypoly = upoly*polymod;
ypcr = [uu.^2 uu ones(um,1)]*pcrmod;
pause

% We could compare the actual and predicted outputs in the 
% scaled space, but insteady lets convert back to the original
% scaling so we have a better idea of what it really looks like.

sylin = rescale(ylin,mcal(1,2),scal(1,2));
synon = rescale(ynon,mcal(1,2),scal(1,2));
syact = rescale(ycal,mcal(1,2),scal(1,2));
spoly = rescale(ypoly,mcal(1,2),scal(1,2));
spcr = rescale(ypcr,mcal(1,2),scal(1,2));
pause

% Now we can plot these up and take a look.

echo off
[m,n] = size(sylin);
plot(1:m,syact,'-r',1:m,syact,'or',1:m,sylin,'--b',1:m,synon,'+m');
axis([0 450 0 14]);
hold on, plot(1:m,spoly,'-g',1:m,spcr,'--r');
title('Fit of Models to Training Data');
xlabel('Sample Number (time)');
ylabel('Observed and Predicted Output');
text(60,13,'Actual Output')
plot(10:3:50,ones(14,1)*13.2,'or',10:3:50,ones(14,1)*13.2,'-r');
text(65,12.4,'Linear Model');
plot(15:3:55,ones(14,1)*12.6,'--b');
text(70,11.8,'Non-Linear PLS')
plot(20:3:60,ones(14,1)*12,'+m');
text(75,11.2,'Non-Linear PCR')
plot(25:3:65,ones(14,1)*11.4,'--r')
text(80,10.6,'Polynomial Regression');
plot(30:3:70,ones(14,1)*10.8,'-g')
hold off
pause
echo on

% The plot might be a little hard to see if you don't have a
% big screen, so lets look at just the first 140 points.
pause

echo off
s = 1:140;
plot(s,syact(1:140),'-r',s,syact(1:140),'or',s,sylin(1:140), ...
'--b',s,synon(1:140),'+m',s,synon(1:140),'-b');
hold on, plot(s,spoly(1:140),'-g',1:140,spcr(1:140),'--r');
title('Fit of Models to Training Data')
xlabel('Sample Number (time)')
ylabel('Observed and Predicted Output')
text(90,5,'Actual Output')
text(92,4.5,'Linear Model')
text(94,4,'Non-Linear PLS')
text(96,3.5,'Non-Linear PCR')
text(98,3,'Polynomial Regression')
plot(70:87,ones(18,1)*5.2,'or',70:87,ones(18,1)*5.2,'-r');
plot(72:89,ones(18,1)*4.7,'--b');
plot(74:91,ones(18,1)*4.2,'+m');
plot(76:93,ones(18,1)*3.7,'--r')
plot(78:95,ones(18,1)*3.2,'-g')
hold off
pause
echo on

% As you can see, the nonlinear models are almost indistinguishabe
% from the observed data while the linear model is off in some
% cases.  In order to quantify this a little better we can 
% calculate the fit error sum of squares.
pause

echo off 
difnon = sum((syact-synon).^2);
diflin = sum((syact-sylin).^2);
difpoly = sum((syact-spoly).^2);
difpcr = sum((syact-spcr).^2);

disp('  ')
disp('  ----Total Sum of Squares Fit Error----')
disp('  Lin PLS    Poly       NL-PCR    NL-PLS')
format = '  %6.2f    %6.2f     %6.2f    %6.2f';
tab = sprintf(format,[diflin difpoly difpcr difnon]); disp(tab)
pause

echo on
% Here we see that all of the non-linear models fit
% the data about as well.  The linear model error
% is definitely larger.

% To see why the nonlinear model works better, lets
% take a look at the x- and y-block scores on the first LV.
% The polynomial fit of the x- and y-block scores is shown
% on the plot.

echo off
plot(T(:,1),U(:,1),'+r'); hold on
pcoeff = polyfit(T(:,1),U(:,1),2);
ppscl = [-3.8:.1:4.8]';
[mpp,npp] = size(ppscl);
ppred = [ppscl.^2 ppscl ones(mpp,1)]*pcoeff';
title('X- vs. Y-Block Scores for First Latent Variable');
xlabel('Score on First X-Block LV');
ylabel('Score on First Y-Block LV');
plot(ppscl,ppred,'-b');
plot([1 2],[-1.5 -1.5],'-b');
text(2.2,-1.6,'Polynomial Fit');
hold off
pause
echo on

% The nonlinearity in this data is apparent in the scores plot.
% The polypls routine uses the polyfit routine in MATLAB to
% fit this curve for the PLS inner relation.

% Now lets see if our model is really predictive by testing
% it on a new data set.  We start by scaling the data and 
% arranging it in the correct form, We then use the polypred
% and plspred functions to make the predictions.  Finally, we
% rescale the prediction to original units.

echo off
stestdata = scale(testdata,mcal,scal);
[utest,ytest] = writein2(stestdata(:,1),stestdata(:,2),6);
ylint = utest*B(3,:)';
ynont = polypred(utest,bp,PP,QP,WP,4);
[myy,nyy] = size(ytest);
ypolyt = [utest.^2 utest ones(myy,nyy)]*polymod;
ypcrt = [(utest*vv(:,1:5)).^2 (utest*vv(:,1:5)) ones(myy,nyy)]*pcrmod;
sylint = rescale(ylint,mcal(1,2),scal(1,2));
synont = rescale(ynont,mcal(1,2),scal(1,2));
syactt = rescale(ytest,mcal(1,2),scal(1,2));
spolyt = rescale(ypolyt,mcal(1,2),scal(1,2));
spcrt = rescale(ypcrt,mcal(1,2),scal(1,2));
echo on

% So lets plot it up and see what we get
pause

echo off
s = 1:451;
plot(s,syactt,'-r',s,syactt,'or',s,sylint,'--b',s,synont,'+m',s,synont,'-b')
axis([0 450 5 10])
hold on, plot(s,spolyt,'-g',s,spcrt,'--r');
title('Results from Non-Linear PLS Model');
xlabel('Sample Number (time)');
ylabel('Observed and Predicted Output');
text(60,6,'Actual Output');
text(65,5.8,'Linear Model');
text(70,5.6,'Non-Linear PLS');
text(75,5.4,'Non-Linear PCR');
text(80,5.2,'Polynomial Regression');
plot(10:3:50,ones(14,1)*6.1,'or',10:3:50,ones(14,1)*6.1,'-r');
plot(15:3:55,ones(14,1)*5.9,'--b');
plot(20:3:60,ones(14,1)*5.7,'+m');
plot(25:3:65,ones(14,1)*5.5,'--r')
plot(30:3:70,ones(14,1)*5.3,'-g')
hold off
pause
echo on

% Once again, this may be a little hard to see on a small screen
% so lets look at the first 140 points.
pause

echo off
plot(1:140,syactt(1:140),'-r',1:140,syactt(1:140),'or',1:140,sylint(1:140), ...
'--b',1:140,synont(1:140),'+m',1:140,synont(1:140),'-b');
hold on, plot(1:140,spolyt(1:140),'-g',1:140,spcrt(1:140),'--r');
title('Results from Non-Linear PLS Model');
xlabel('Sample Number (time)');
ylabel('Observed and Predicted Output');
text(20,7,'Actual Output');
text(22,6.8,'Linear Model');
text(24,6.6,'Non-Linear PLS');
text(26,6.4,'Non-Linear PCR');
text(28,6.2,'Polynomial Regression');
plot(6:18,ones(13,1)*7.1,'or',6:18,ones(13,1)*7.1,'-r');
plot(8:20,ones(13,1)*6.9,'--b');
plot(10:22,ones(13,1)*6.7,'+m');
plot(12:24,ones(13,1)*6.5,'--r');
plot(14:26,ones(13,1)*6.3,'-g');
hold off
pause
echo on

% This time the nonlinear model is sometimes off a little bit,
% but it is much closer than the linear model
pause

echo off
difnonp = sum((syactt-synont).^2);
diflinp = sum((syactt-sylint).^2);
difpolyp = sum((syactt-spolyt).^2);
difpcrp = sum((syactt-spcrt).^2);
echo on

% We can also take a look at the total sum of squares prediction
% error of the various models. We'll include the fit errors 
% calculated above in our table for comparison.
pause

echo off
disp('  ')
disp('Total Sum of Squares Fit and Prediction Error')
disp('  Lin PLS    Poly       NL-PCR    NL-PLS')
format = '  %6.2f    %6.2f     %6.2f    %6.2f';
tab = sprintf(format,[diflin difpoly difpcr difnon]); disp(tab)
tab = sprintf(format,[diflinp difpolyp difpcrp difnonp]); disp(tab)
echo on

% Here we see that even though the NL-PLS didn't fit better
% than the Polynomial, it gives considerably better prediction.

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久99精品网久久| 26uuu另类欧美| 久久精品免视看| 亚洲不卡一区二区三区| 国产精品一区二区在线播放| 欧美午夜宅男影院| 国产精品日产欧美久久久久| 青娱乐精品视频| 欧美日韩在线一区二区| 欧美韩国日本不卡| 粉嫩高潮美女一区二区三区| 精品精品国产高清一毛片一天堂| 亚洲成人动漫在线观看| 99久久国产综合精品女不卡| 久久影院午夜片一区| 蜜桃视频第一区免费观看| 欧美日韩一级视频| 亚洲成av人片| 欧美视频精品在线观看| 亚洲一区日韩精品中文字幕| 91在线观看下载| 亚洲欧洲精品天堂一级| 成人教育av在线| 中文字幕亚洲一区二区av在线 | 亚洲午夜久久久久久久久电影院| 国产成人激情av| 国产人伦精品一区二区| 国产一区二区影院| 精品久久久久久久久久久久久久久 | 亚洲国产视频直播| 成人精品电影在线观看| ㊣最新国产の精品bt伙计久久| 国产福利91精品一区| 久久久久国产精品麻豆| 国产高清精品网站| 亚洲欧美综合在线精品| 色噜噜狠狠色综合中国| 亚洲自拍与偷拍| 69堂国产成人免费视频| 久久精品国产一区二区三| 欧美成人精品福利| 高清免费成人av| 亚洲欧洲99久久| 欧美日韩一区视频| 蜜臀av在线播放一区二区三区| 欧美成va人片在线观看| 高清beeg欧美| 一区2区3区在线看| 91精品国产福利| 国内一区二区在线| 国产精品福利一区| 欧美精品第1页| 国产美女一区二区三区| 亚洲乱码精品一二三四区日韩在线| 欧美视频一区二区三区在线观看| 免费观看在线色综合| 亚洲国产高清不卡| 欧美日韩午夜影院| 国产精品一区免费在线观看| 99久久亚洲一区二区三区青草| 亚洲精品欧美专区| eeuss鲁片一区二区三区在线看| 一区二区三区日韩在线观看| 欧美一级生活片| 欧美理论片在线| 欧美日韩在线一区二区| 91在线视频官网| 99国产精品久久久| 91蝌蚪国产九色| 色婷婷综合五月| 色94色欧美sute亚洲13| 色噜噜夜夜夜综合网| 在线免费精品视频| 欧美日韩国产区一| 久久久久免费观看| 国产精品丝袜在线| 国产精品久久国产精麻豆99网站| 国产精品人人做人人爽人人添| 国产精品天美传媒| 亚洲欧美日韩国产综合在线| 亚洲精品国产一区二区三区四区在线| 亚洲蜜桃精久久久久久久| 亚洲午夜久久久久| 免费看日韩精品| 国产一区二区三区不卡在线观看| 国产精品1区二区.| 99国产欧美久久久精品| 在线亚洲免费视频| 91精品国产综合久久久久久| 日韩欧美精品三级| 久久久av毛片精品| 18成人在线观看| 丝袜a∨在线一区二区三区不卡| 免播放器亚洲一区| 成人午夜私人影院| 91精品办公室少妇高潮对白| 欧美日韩在线免费视频| 久久综合久久99| 亚洲天堂福利av| 日本一不卡视频| 国产suv精品一区二区三区| 91片在线免费观看| 日韩欧美在线1卡| 国产精品久久久久婷婷二区次| 亚洲国产综合人成综合网站| 麻豆91在线看| 91一区二区三区在线播放| 欧美三级韩国三级日本三斤| 久久午夜电影网| 亚洲在线一区二区三区| 精品一区二区久久久| 色88888久久久久久影院按摩 | 亚洲小说欧美激情另类| 美女视频一区二区| 99re这里只有精品视频首页| 欧美一级二级三级蜜桃| 国产精品短视频| 蜜臀av一区二区在线观看| eeuss国产一区二区三区| 在线不卡欧美精品一区二区三区| 国产色婷婷亚洲99精品小说| 五月婷婷色综合| 91麻豆自制传媒国产之光| 欧美电影免费观看高清完整版在线| 综合分类小说区另类春色亚洲小说欧美 | 欧美这里有精品| 久久亚洲综合色| 性做久久久久久免费观看| 成人精品gif动图一区| 精品国产成人在线影院| 亚洲午夜日本在线观看| av一本久道久久综合久久鬼色| 日韩视频中午一区| 亚洲一区影音先锋| 99久久精品情趣| 久久精品日韩一区二区三区| 日韩国产欧美在线观看| 91久久奴性调教| 国产精品区一区二区三区| 美国欧美日韩国产在线播放| 欧美日韩你懂的| 亚洲欧美二区三区| 成人午夜视频在线观看| 久久久久国产一区二区三区四区| 蜜臀av一区二区在线观看| 欧美日韩一本到| 成人午夜免费视频| 精品国产乱码久久久久久免费 | 色婷婷亚洲一区二区三区| 久久久精品欧美丰满| 久久99久久99精品免视看婷婷| 欧美肥妇free| 无码av免费一区二区三区试看 | 精品处破学生在线二十三| 午夜精品在线看| 欧美日韩专区在线| 亚洲成人免费电影| 欧美丰满美乳xxx高潮www| 亚洲国产精品一区二区www| 91久久一区二区| 亚洲在线中文字幕| 欧美日韩午夜影院| 青娱乐精品视频| 欧美电影免费观看高清完整版| 日韩精品欧美精品| 日韩视频一区二区在线观看| 免费看欧美女人艹b| 精品国产伦一区二区三区观看方式 | 国产精品免费aⅴ片在线观看| 国产精品99久久不卡二区| 久久久精品2019中文字幕之3| 国产一区激情在线| 国产日本欧洲亚洲| 成人手机电影网| 亚洲婷婷在线视频| 在线观看国产91| 日韩精彩视频在线观看| 51精品视频一区二区三区| 男女男精品视频网| 精品剧情在线观看| 成人网在线播放| 亚洲激情欧美激情| 337p亚洲精品色噜噜| 久久99久国产精品黄毛片色诱| 久久色在线视频| 99久久99久久精品免费观看| 亚洲乱码国产乱码精品精可以看| 欧美三级午夜理伦三级中视频| 日本午夜精品视频在线观看 | 欧美日韩一区二区三区四区 | 欧美一级高清大全免费观看| 国产一区二区三区不卡在线观看| 国产精品少妇自拍| 欧美视频一区二区在线观看| 麻豆高清免费国产一区| 国产精品卡一卡二| 欧美日韩国产天堂| 国产呦精品一区二区三区网站| 中文字幕一区二区三区在线观看| 欧美又粗又大又爽|