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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pls_train.m

?? 這是我找到的一個模式識別工具箱
?? M
字號:
%pls_train Partial Least Squares (training)%%  [B,XRes,YRes,Options] = pls_train(X,Y)%  [B,XRes,YRes,Options] = pls_train(X,Y,Options)%% INPUT%  X   [N -by- d_X]  the training (input)  data matrix, N samples, d_X variables%  Y   [N -by- d_Y]  the training (output) data matrix, N samples, d_Y variables%%  Options.%   maxLV        maximal number of latent variables (will be corrected%                if > rank(X)); %                maxLV=inf means maxLV=min(N,d_X) -- theoretical maximum%                number of LV; %                by default =inf%   method       'NIPALS' or 'SIMPLS'; by default ='SIMPLS'%%   X_centering  do nothing (=[] or 0), do mean centering (=nan), center%                around some vaue v (=v); %                by default  =[]%   Y_centering  do nothing (=[] or 0), do mean centering (=nan), center%                around some vaue v (=v); %                by default  =[]%   X_scaling    do nothing (=[] or 1), divide each col by std (=nan),%                divide by some v (=v); %                by default =[]%   Y_scaling    do nothing (=[] or 1), divide each col by std (=nan),%                divide by some v (=v); %                by default =[]%% OUTPUT%  B      [d_X -by- d_Y -by- nLV]  collection of regression matrices:%         Y_new = X_new*B(:,:,n) represents regression on the first n%         latent variables (X_new here after preprocessing, Y_new before%         un-preprocessing)%  XRes.%   ssq  [1 -by- nLV]    the part of explaind sum of squares of%        (preprocessed) X matrix%   T    [N -by- nLV]    scores   (transformed (preprocessed) X)%   R    [d_X -by- nLV]  weights  (transformation matrix)%   P    [d_X -by- nLV]  loadings (back-transformation matrix)%                        P(:,k) are the regression coef of%                        (preprocessed) X on T(:,k)%   W    [d_X -by- nLV]  local weights (local transformation matrix);%                        ONLY FOR NIPALS%   V    [d_X -by- nLV]  first k columns of this matrix are the%                        orthornormal basis of the space spanned by k%                        first columns of P; ONLY FOR SIMPLS%  YRes.%   ssq  [1 -by- nLV]    the part of explained sum of squares of%                        (preprocessed) Y matrix%   U    [N -by- nLV]    scores   (transformed (preprocessed) Y)%   Q    [d_Y -by- nLV]  weights  (transformation matrix)%   C    [d_Y -by- nLV]  C(:,k) are the regression coeff of%                        (preprocessed) Y on T(:,k)%   bin  [1 -by- nLV]    bin(k) is the regression coeff of U(:,k) on T(:,k)%%  Options. contains the same fields as in input, but the values can be changed %           (e.g. after mean centering X_centering = mean(X,1))%%% DESCRIPTION% Trains PLS (Partial Least Squares) regression model%% Relations between matrices (X end Y are assumed to be preprocessed):% NIPALS:% T = X*R (columns of T are orthogonal)% R = W*inv(P'*W)% P = X'*T*inv(T'*T)% U = Y*Q - T*(C'*Q-tril(C'*Q))% C = Y'*T*inv(T'*T) = Q*diag(bin)% bin = sqrt(diag(T'*Y*Y'*T))'*inv(T'*T))% B = R*C' = W*inv(P'*W)*C'%% SIMPLS:% T = X*R (columns of T are orthonormal)% P = X'*T% U = Y*Q% C = Y'*T = Q*diag(bin)% bin = sqrt(diag(T'*Y*Y'*T))'% B = R*C'%% BOTH:% T_new = X_new*R% Y_new = X_new*B%  % SEE ALSO% pls_apply, pls_transform% Copyright: S.Verzakov, s.verzakov@ewi.tudelft.nl % Faculty EWI, Delft University of Technology% P.O. Box 5031, 2600 GA Delft, The Netherlands% $Id: pls_train.m,v 1.1 2007/08/28 11:00:39 davidt Exp $function [B, XRes, YRes, Options] = pls_train(X,Y,Options)[N_X, d_X] = size(X);[N_Y, d_Y] = size(Y);if N_X ~= N_Y  error('size(X,1) must be equal to size(Y,1)');else  N = N_X;endif nargin < 3  Options  = [];endDefaultOptions.X_centering = [];DefaultOptions.Y_centering = [];DefaultOptions.X_scaling = [];DefaultOptions.Y_scaling = [];DefaultOptions.maxLV = inf;DefaultOptions.method = 'SIMPLS';Options = pls_updstruct(DefaultOptions, Options);if isinf(Options.maxLV)  Options.maxLV = min(N,d_X);elseif Options.maxLV > min(N,d_X)  error('PLS: The number of LV(s) cannot be greater then min(N,d_X)');end[X, Options.X_centering, Options.X_scaling] = pls_prepro(X, Options.X_centering, Options.X_scaling);[Y, Options.Y_centering, Options.Y_scaling] = pls_prepro(Y, Options.Y_centering, Options.Y_scaling);ssq_X = sum(X(:).^2);ssq_Y = sum(Y(:).^2);B = zeros(d_X,d_Y,Options.maxLV);XRes.ssq = zeros(1,Options.maxLV);XRes.T   = zeros(N,Options.maxLV);XRes.R   = zeros(d_X,Options.maxLV);XRes.P   = zeros(d_X,Options.maxLV);XRes.W   = [];XRes.V   = [];YRes.ssq = zeros(1,Options.maxLV);  YRes.U   = zeros(N,Options.maxLV);  YRes.Q   = zeros(d_Y,Options.maxLV);YRes.C   = zeros(d_Y,Options.maxLV);YRes.bin = zeros(1,Options.maxLV);  ev = zeros(1,Options.maxLV);nLV = Options.maxLV;opts.disp   = 0;opts.issym  = 1;opts.isreal = 1;switch upper(Options.method)case 'NIPALS'  XRes.W = zeros(d_X,Options.maxLV);  for LV = 1:Options.maxLV    S = X'*Y;    if d_X <= d_Y      if d_X > 1        [w, ev(LV)] = eigs(S*S',1,'LA',opts);      else        w = 1;        ev(LV) = S*S';      end            t = X*w;  	  t2 = (t'*t);      proj = t/t2;  	  p = X'*proj;      c = Y'*proj;      bin = norm(c);  %bin = sqrt(ev)/t2:      q = c/bin;      u = Y*q;    else      if d_Y > 1        [q, ev(LV)] = eigs(S'*S,1,'LA',opts);      else        q = 1;        ev(LV) = S'*S;      end      u = Y*q;      w = X'*u;  	  w = w/norm(w);  	  t = X*w;   	  t2 = (t'*t);      proj = t/t2;  	  p = X'*proj;            bin = u'*proj;  %bin = sqrt(ev)/t2:      c = q*bin;  	end	  if LV == 1       if ev(LV) == 0        error('PLS: Rank of the covariation matrix X''*Y is zero.');      end  	  elseif ev(LV) <= 1e-16*ev(1)      nLV = LV-1;      WarnMsg = sprintf(['\nPLS: Rank of the covariation matrix X''*Y is exausted ' ...                         'after removing %d Latent Variable(s).\n'...                         'Results only for the %d LV(s) will be returned'],nLV,nLV);      if exist('prwarning')        prwarning(1, WarnMsg);      else        warning(WarnMsg);      end      break;	  end    %R = W*inv(P'*W)    %the next portion of the code makes use of the fact taht P'*W is the upper triangle matrix:    %     %if LV == 1    %  InvPTW(1,1) = 1/(p'*w);    %  r = w*InvPTW(1,1);    %else    %  InvPTW(1:LV,LV) = [(-InvPTW(1:LV-1,1:LV-1)*(XRes.P(:,1:LV-1)'*w)); 1]/(p'*w);    %  r = [XRes.W(:,1:LV-1), w] * InvPTW(1:LV,LV);    %end      %     %some optimization of the above code (notice that ones(m,0)*ones(0,n) == zeros(m,n)):    %    r = (w - (XRes.R(:,1:LV-1)*(XRes.P(:,1:LV-1)'*w)))/(p'*w);    B(:,:,LV) = r*c';  	XRes.ssq(:,LV) = t2*(p'*p)/ssq_X;  	XRes.T(:,LV)   = t;	  XRes.R(:,LV)   = r;  	XRes.P(:,LV)   = p;  	XRes.W(:,LV)   = w;         	  YRes.ssq(:,LV) = t2*(bin.^2)/ssq_Y;  	YRes.U(:,LV)   = u;  	YRes.Q(:,LV)   = q;  	YRes.C(:,LV)   = c;  	YRes.bin(:,LV) = bin;	    	X = X - t*p';  	Y = Y - t*c';  end  if nLV < Options.maxLV    XRes.W = XRes.W(:,1:nLV);  endcase 'SIMPLS'  XRes.V = zeros(d_X,Options.maxLV);  S = X'*Y;  for LV = 1:Options.maxLV	  if d_X <= d_Y		  if d_X > 1        [r, ev(LV)] = eigs(S*S',1,'LA',opts);      else        r = 1;        ev(LV) = S*S';      end		        t = X*r;		  norm_t = norm(t);		  r = r/norm_t;		  t = t/norm_t;		  p = X'*t;		  c = Y'*t;      %c = S'*r;		  bin = norm(c); %bin = sqrt(ev)/norm_t:		  q = c/bin;		  u = Y*q;    else      if d_Y > 1        [q, ev(LV)] = eigs(S'*S,1,'LA',opts);      else        q = 1;        ev(LV) = S'*S;      end      r = S*q;		  t = X*r;		  norm_t = norm(t);		  r = r/norm_t;		  t = t/norm_t;		  p = X'*t;			u = Y*q;		  bin = u'*t;    %bin = ev/norm_t:		  c = q*bin;	  end	  if LV == 1		  if ev(LV) == 0        error('PLS: Rank of the covariation matrix X''*Y is zero.');      else        v = p;      end  	  elseif ev(LV) <= 1e-16*ev(1)      nLV = LV-1;      WarnMsg = sprintf(['\nPLS: Rank of the covariation matrix X''*Y is exausted ' ...                         'after removing %d Latent Variable(s).\n'...                         'Results only for the %d LV(s) will be returned'],nLV,nLV);      if exist('prwarning')        prwarning(1, WarnMsg);      else        warning(WarnMsg);      end      break;    else  	  v = p - XRes.V(:,1:LV-1)*(XRes.V(:,1:LV-1)'*p);	  end	  v = v/norm(v);    B(:,:,LV) = r*c';	      XRes.ssq(:,LV) = (p'*p)/ssq_X;	  XRes.T(:,LV)   = t;	  XRes.R(:,LV)   = r;	  XRes.P(:,LV)   = p;	  XRes.V(:,LV)   = v;	  YRes.ssq(:,LV) = (bin.^2)/ssq_Y;	  YRes.U(:,LV)   = u;	  YRes.Q(:,LV)   = q;	  YRes.C(:,LV)   = c;	  YRes.bin(:,LV) = bin;	  	  S = S - v*(v'*S);  end  if nLV < Options.maxLV    XRes.V = XRes.V(:,1:nLV);  endendif nLV < Options.maxLV  B = B(:,:,1:nLV);  XRes.ssq = XRes.ssq(:,1:nLV);  XRes.T   = XRes.T(:,1:nLV);    XRes.R   = XRes.R(:,1:nLV);      XRes.P   = XRes.P(:,1:nLV);    YRes.ssq = YRes.ssq(:,1:nLV);  YRes.U   = YRes.U(:,1:nLV);    YRes.Q   = YRes.Q(:,1:nLV);    YRes.C   = YRes.C(:,1:nLV);    YRes.bin = YRes.bin(:,1:nLV);   Options.maxLV = nLV;endB = cumsum(B,3);return;function A = MakeSym(A)A = 0.5*(A+A');%A = max(A,A');return

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕永久在线不卡| 99精品偷自拍| 亚洲成人免费影院| 亚洲欧美国产77777| 中文字幕一区二区三中文字幕| 精品国产sm最大网站免费看| 日韩免费看网站| 在线综合视频播放| 日韩无一区二区| 欧美白人最猛性xxxxx69交| 欧美一区二区日韩| 精品少妇一区二区三区视频免付费| 4438x成人网最大色成网站| 69p69国产精品| 久久久精品国产免费观看同学| 久久久久久夜精品精品免费| 国产精品网站在线观看| 亚洲精品第1页| 日本不卡一区二区三区高清视频| 日韩在线一区二区三区| 国产一区二区看久久| 99免费精品视频| 欧美精选午夜久久久乱码6080| 中文字幕一区二区三| 亚洲激情成人在线| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产一区二区不卡老阿姨| 99免费精品在线| 91精品国产91久久综合桃花| 国产午夜久久久久| 一区二区三区在线看| 麻豆国产一区二区| caoporen国产精品视频| 欧美日韩国产综合视频在线观看| 精品福利在线导航| 亚洲美女屁股眼交3| 精品在线观看免费| 91小视频在线| 欧美成人一区二区三区在线观看 | 91免费版在线| 欧美精品丝袜中出| 国产喷白浆一区二区三区| 亚洲一区二区欧美日韩| 国产成人午夜99999| 欧美日韩亚洲另类| 中文字幕电影一区| 蜜桃免费网站一区二区三区| 色诱亚洲精品久久久久久| 精品国产一区二区三区不卡| 亚洲国产另类av| 成人av网站在线观看| 日韩免费电影一区| 亚洲一二三区在线观看| thepron国产精品| 久久中文娱乐网| 美女高潮久久久| 欧美日韩一区二区三区四区| 亚洲男人天堂一区| 成人在线视频一区二区| 久久亚洲精品国产精品紫薇| 日本不卡123| 666欧美在线视频| 亚洲va天堂va国产va久| 在线视频国产一区| 亚洲人成伊人成综合网小说| 国产精品原创巨作av| 日韩免费高清av| 精品一区二区三区影院在线午夜| 欧美日免费三级在线| 亚洲国产成人porn| 欧美在线观看18| 亚洲第一久久影院| 欧美系列在线观看| 亚洲一二三四区不卡| 欧美性高清videossexo| 亚洲一区视频在线观看视频| 91福利在线播放| 亚洲一级电影视频| 欧美日韩亚州综合| 日本亚洲天堂网| 欧美精品一级二级三级| 日韩成人一区二区三区在线观看| 欧美日韩国产中文| 免费国产亚洲视频| 26uuu精品一区二区| 国产91丝袜在线观看| 国产色一区二区| 99精品久久免费看蜜臀剧情介绍| 中文字幕视频一区二区三区久| 99视频在线观看一区三区| 亚洲另类春色校园小说| 欧美日韩另类一区| 蜜臀av在线播放一区二区三区| 欧美videos中文字幕| 国产精品1024久久| 又紧又大又爽精品一区二区| 欧美日韩一区二区三区四区 | 亚洲激情五月婷婷| 欧美日韩一级二级三级| 韩国成人福利片在线播放| 国产午夜精品一区二区三区嫩草| av激情亚洲男人天堂| 午夜激情一区二区三区| 欧美精品一区二区三区高清aⅴ| 成人免费视频一区| 亚洲高清不卡在线| 久久久久久久免费视频了| 91在线观看美女| 美女视频黄 久久| 国产精品久久久久一区二区三区| 欧美视频一区二区| 国产成人午夜精品5599| 亚洲6080在线| 国产精品免费免费| 91超碰这里只有精品国产| 国产成人精品免费在线| 亚洲国产cao| 欧美激情自拍偷拍| 制服丝袜国产精品| 91视频www| 国产精华液一区二区三区| 亚洲黄色av一区| 久久综合狠狠综合久久激情| 在线观看精品一区| 成人黄色av网站在线| 日本不卡视频一二三区| 亚洲综合免费观看高清完整版在线 | 国产一区二区三区免费| 亚洲国产色一区| 国产精品乱人伦一区二区| 日韩女优av电影在线观看| 欧美日韩中字一区| 亚洲精品一区二区三区精华液 | 国产成人在线观看免费网站| 日日摸夜夜添夜夜添国产精品 | 欧美成人三级电影在线| 欧美日韩国产高清一区| 91在线码无精品| 成人午夜免费电影| 国产麻豆欧美日韩一区| 久久99国产精品成人| 日韩精彩视频在线观看| 亚洲va韩国va欧美va精品| 亚洲男人电影天堂| 亚洲欧美一区二区三区极速播放| 国产日本欧洲亚洲| 国产亚洲一本大道中文在线| 久久免费视频色| 久久一日本道色综合| 久久综合中文字幕| 久久欧美中文字幕| 精品国产乱码久久久久久1区2区 | 国产精品一卡二卡在线观看| 看电视剧不卡顿的网站| 日本不卡一区二区| 免费av网站大全久久| 日本免费新一区视频| 久久精品国产99国产| 久久成人免费网站| 国产精品资源在线看| 懂色av一区二区夜夜嗨| 91在线国产福利| 欧洲一区二区av| 欧美日韩国产免费| 日韩一级二级三级精品视频| 欧美成人福利视频| 国产精品女人毛片| 亚洲另类中文字| 日韩精品乱码免费| 狠狠狠色丁香婷婷综合久久五月| 国产美女av一区二区三区| 成人黄色777网| 欧美最猛性xxxxx直播| 欧美一区二区免费视频| 久久久久久久综合| 亚洲欧美成人一区二区三区| 午夜欧美一区二区三区在线播放| 美女精品一区二区| 91在线精品一区二区三区| 欧美精品一二三| 精品国产乱码久久久久久夜甘婷婷| 亚洲另类一区二区| 精品国产成人在线影院| 国产精品入口麻豆原神| 亚洲午夜免费视频| 黄色小说综合网站| 色婷婷国产精品综合在线观看| 欧美精三区欧美精三区| 国产婷婷一区二区| 亚洲成人综合网站| 国产精品伊人色| 欧美精品久久久久久久久老牛影院| 精品日韩一区二区三区免费视频| 中文字幕欧美日韩一区| 日韩国产在线观看一区| 成人天堂资源www在线| 4438亚洲最大| 亚洲视频一区二区在线| 久久国产精品99精品国产 | 亚洲国产视频一区|