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

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

?? pcamat.m

?? 獨立成分分析算法
?? M
字號:
function [E, D] = pcamat(vectors, firstEig, lastEig, s_interactive, ...    s_verbose);%PCAMAT - Calculates the pca for data%% [E, D] = pcamat(vectors, firstEig, lastEig, ... %                 interactive, verbose);%% Calculates the PCA matrices for given data (row) vectors. Returns% the eigenvector (E) and diagonal eigenvalue (D) matrices containing the% selected subspaces. Dimensionality reduction is controlled with% the parameters 'firstEig' and 'lastEig' - but it can also be done% interactively by setting parameter 'interactive' to 'on' or 'gui'.%% ARGUMENTS%% vectors       Data in row vectors.% firstEig      Index of the largest eigenvalue to keep.%               Default is 1.% lastEig       Index of the smallest eigenvalue to keep.%               Default is equal to dimension of vectors.% interactive   Specify eigenvalues to keep interactively. Note that if%               you set 'interactive' to 'on' or 'gui' then the values%               for 'firstEig' and 'lastEig' will be ignored, but they%               still have to be entered. If the value is 'gui' then the%               same graphical user interface as in FASTICAG will be%               used. Default is 'off'.% verbose       Default is 'on'.%%% EXAMPLE%       [E, D] = pcamat(vectors);%% Note %       The eigenvalues and eigenvectors returned by PCAMAT are not sorted.%% This function is needed by FASTICA and FASTICAG% For historical reasons this version does not sort the eigenvalues or% the eigen vectors in any ways. Therefore neither does the FASTICA or% FASTICAG. Generally it seams that the components returned from% whitening is almost in reversed order. (That means, they usually are,% but sometime they are not - depends on the EIG-command of matlab.)% @(#)$Id: pcamat.m,v 1.5 2003/12/15 18:24:32 jarmo Exp $%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Default values:if nargin < 5, s_verbose = 'on'; endif nargin < 4, s_interactive = 'off'; endif nargin < 3, lastEig = size(vectors, 1); endif nargin < 2, firstEig = 1; end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Check the optional parameters;switch lower(s_verbose) case 'on'  b_verbose = 1; case 'off'  b_verbose = 0; otherwise  error(sprintf('Illegal value [ %s ] for parameter: ''verbose''\n', s_verbose));endswitch lower(s_interactive) case 'on'  b_interactive = 1; case 'off'  b_interactive = 0; case 'gui'  b_interactive = 2; otherwise  error(sprintf('Illegal value [ %s ] for parameter: ''interactive''\n', ...		s_interactive));endoldDimension = size (vectors, 1);if ~(b_interactive)  if lastEig < 1 | lastEig > oldDimension    error(sprintf('Illegal value [ %d ] for parameter: ''lastEig''\n', lastEig));  end  if firstEig < 1 | firstEig > lastEig    error(sprintf('Illegal value [ %d ] for parameter: ''firstEig''\n', firstEig));  endend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Calculate PCA% Calculate the covariance matrix.if b_verbose, fprintf ('Calculating covariance...\n'); endcovarianceMatrix = cov(vectors', 1);% Calculate the eigenvalues and eigenvectors of covariance% matrix.[E, D] = eig (covarianceMatrix);% The rank is determined from the eigenvalues - and not directly by% using the function rank - because function rank uses svd, which% in some cases gives a higher dimensionality than what can be used% with eig later on (eig then gives negative eigenvalues).rankTolerance = 1e-7;maxLastEig = sum (diag (D) > rankTolerance);if maxLastEig == 0,  fprintf (['Eigenvalues of the covariance matrix are' ...	    ' all smaller than tolerance [ %g ].\n' ...	    'Please make sure that your data matrix contains' ...	    ' nonzero values.\nIf the values are very small,' ...	    ' try rescaling the data matrix.\n'], rankTolerance);  error ('Unable to continue, aborting.');end% Sort the eigenvalues - decending.eigenvalues = flipud(sort(diag(D)));%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Interactive part - command-lineif b_interactive == 1  % Show the eigenvalues to the user  hndl_win=figure;  bar(eigenvalues);  title('Eigenvalues');  % ask the range from the user...  % ... and keep on asking until the range is valid :-)  areValuesOK=0;  while areValuesOK == 0    firstEig = input('The index of the largest eigenvalue to keep? (1) ');    lastEig = input(['The index of the smallest eigenvalue to keep? (' ...                    int2str(oldDimension) ') ']);    % Check the new values...    % if they are empty then use default values    if isempty(firstEig), firstEig = 1;end    if isempty(lastEig), lastEig = oldDimension;end    % Check that the entered values are within the range    areValuesOK = 1;    if lastEig < 1 | lastEig > oldDimension      fprintf('Illegal number for the last eigenvalue.\n');      areValuesOK = 0;    end    if firstEig < 1 | firstEig > lastEig      fprintf('Illegal number for the first eigenvalue.\n');      areValuesOK = 0;    end  end  % close the window  close(hndl_win);end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Interactive part - GUIif b_interactive == 2  % Show the eigenvalues to the user  hndl_win = figure('Color',[0.8 0.8 0.8], ...    'PaperType','a4letter', ...    'Units', 'normalized', ...    'Name', 'FastICA: Reduce dimension', ...    'NumberTitle','off', ...    'Tag', 'f_eig');  h_frame = uicontrol('Parent', hndl_win, ...    'BackgroundColor',[0.701961 0.701961 0.701961], ...    'Units', 'normalized', ...    'Position',[0.13 0.05 0.775 0.17], ...    'Style','frame', ...    'Tag','f_frame');b = uicontrol('Parent',hndl_win, ...	'Units','normalized', ...	'BackgroundColor',[0.701961 0.701961 0.701961], ...	'HorizontalAlignment','left', ...	'Position',[0.142415 0.0949436 0.712077 0.108507], ...	'String','Give the indices of the largest and smallest eigenvalues of the covariance matrix to be included in the reduced data.', ...	'Style','text', ...	'Tag','StaticText1');e_first = uicontrol('Parent',hndl_win, ...	'Units','normalized', ...	'Callback',[ ...          'f=round(str2num(get(gcbo, ''String'')));' ...          'if (f < 1), f=1; end;' ...          'l=str2num(get(findobj(''Tag'',''e_last''), ''String''));' ...          'if (f > l), f=l; end;' ...          'set(gcbo, ''String'', int2str(f));' ...          ], ...	'BackgroundColor',[1 1 1], ...	'HorizontalAlignment','right', ...	'Position',[0.284831 0.0678168 0.12207 0.0542535], ...	'Style','edit', ...        'String', '1', ...	'Tag','e_first');b = uicontrol('Parent',hndl_win, ...	'Units','normalized', ...	'BackgroundColor',[0.701961 0.701961 0.701961], ...	'HorizontalAlignment','left', ...	'Position',[0.142415 0.0678168 0.12207 0.0542535], ...	'String','Range from', ...	'Style','text', ...	'Tag','StaticText2');e_last = uicontrol('Parent',hndl_win, ...	'Units','normalized', ...	'Callback',[ ...          'l=round(str2num(get(gcbo, ''String'')));' ...          'lmax = get(gcbo, ''UserData'');' ...          'if (l > lmax), l=lmax; fprintf([''The selected value was too large, or the selected eigenvalues were close to zero\n'']); end;' ...          'f=str2num(get(findobj(''Tag'',''e_first''), ''String''));' ...          'if (l < f), l=f; end;' ...          'set(gcbo, ''String'', int2str(l));' ...          ], ...	'BackgroundColor',[1 1 1], ...	'HorizontalAlignment','right', ...	'Position',[0.467936 0.0678168 0.12207 0.0542535], ...	'Style','edit', ...        'String', int2str(maxLastEig), ...        'UserData', maxLastEig, ...	'Tag','e_last');% in the first version oldDimension was used instead of % maxLastEig, but since the program would automatically% drop the eigenvalues afte maxLastEig...b = uicontrol('Parent',hndl_win, ...	'Units','normalized', ...	'BackgroundColor',[0.701961 0.701961 0.701961], ...	'HorizontalAlignment','left', ...	'Position',[0.427246 0.0678168 0.0406901 0.0542535], ...	'String','to', ...	'Style','text', ...	'Tag','StaticText3');b = uicontrol('Parent',hndl_win, ...	'Units','normalized', ...	'Callback','uiresume(gcbf)', ...	'Position',[0.630697 0.0678168 0.12207 0.0542535], ...	'String','OK', ...	'Tag','Pushbutton1');b = uicontrol('Parent',hndl_win, ...	'Units','normalized', ...	'Callback',[ ...          'gui_help(''pcamat'');' ...          ], ...	'Position',[0.767008 0.0678168 0.12207 0.0542535], ...	'String','Help', ...	'Tag','Pushbutton2');  h_axes = axes('Position' ,[0.13 0.3 0.775 0.6]);  set(hndl_win, 'currentaxes',h_axes);  bar(eigenvalues);  title('Eigenvalues');  uiwait(hndl_win);  firstEig = str2num(get(e_first, 'String'));  lastEig = str2num(get(e_last, 'String'));  % close the window  close(hndl_win);end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% See if the user has reduced the dimension enoughtif lastEig > maxLastEig  lastEig = maxLastEig;  if b_verbose    fprintf('Dimension reduced to %d due to the singularity of covariance matrix\n',...           lastEig-firstEig+1);  endelse  % Reduce the dimensionality of the problem.  if b_verbose    if oldDimension == (lastEig - firstEig + 1)      fprintf ('Dimension not reduced.\n');    else      fprintf ('Reducing dimension...\n');    end  endend%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Drop the smaller eigenvaluesif lastEig < oldDimension  lowerLimitValue = (eigenvalues(lastEig) + eigenvalues(lastEig + 1)) / 2;else  lowerLimitValue = eigenvalues(oldDimension) - 1;endlowerColumns = diag(D) > lowerLimitValue;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Drop the larger eigenvaluesif firstEig > 1  higherLimitValue = (eigenvalues(firstEig - 1) + eigenvalues(firstEig)) / 2;else  higherLimitValue = eigenvalues(1) + 1;endhigherColumns = diag(D) < higherLimitValue;% Combine the results from aboveselectedColumns = lowerColumns & higherColumns;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% print some info for the userif b_verbose  fprintf ('Selected [ %d ] dimensions.\n', sum (selectedColumns));endif sum (selectedColumns) ~= (lastEig - firstEig + 1),  error ('Selected a wrong number of dimensions.');endif b_verbose  fprintf ('Smallest remaining (non-zero) eigenvalue [ %g ]\n', eigenvalues(lastEig));  fprintf ('Largest remaining (non-zero) eigenvalue [ %g ]\n', eigenvalues(firstEig));  fprintf ('Sum of removed eigenvalues [ %g ]\n', sum(diag(D) .* ...    (~selectedColumns)));end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Select the colums which correspond to the desired range% of eigenvalues.E = selcol(E, selectedColumns);D = selcol(selcol(D, selectedColumns)', selectedColumns);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Some more informationif b_verbose  sumAll=sum(eigenvalues);  sumUsed=sum(diag(D));  retained = (sumUsed / sumAll) * 100;  fprintf('[ %g ] %% of (non-zero) eigenvalues retained.\n', retained);end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%function newMatrix = selcol(oldMatrix, maskVector);% newMatrix = selcol(oldMatrix, maskVector);%% Selects the columns of the matrix that marked by one in the given vector.% The maskVector is a column vector.% 15.3.1998if size(maskVector, 1) ~= size(oldMatrix, 2),  error ('The mask vector and matrix are of uncompatible size.');endnumTaken = 0;for i = 1 : size (maskVector, 1),  if maskVector(i, 1) == 1,    takingMask(1, numTaken + 1) = i;    numTaken = numTaken + 1;  endendnewMatrix = oldMatrix(:, takingMask);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久成人羞羞网站| wwwwxxxxx欧美| 狠狠色丁香久久婷婷综合丁香| 亚洲乱码中文字幕| 亚洲欧美日韩国产成人精品影院| 中文字幕乱码久久午夜不卡| 国产蜜臀av在线一区二区三区| 久久久精品国产99久久精品芒果| 久久久精品tv| 亚洲三级理论片| 亚洲一区免费在线观看| 亚洲韩国一区二区三区| 日本少妇一区二区| 国产在线视频一区二区三区| 国产成人无遮挡在线视频| 久久天天做天天爱综合色| 欧美大片拔萝卜| 99久久99久久精品免费看蜜桃| 99久久免费精品| 欧美无砖砖区免费| 欧美成人vps| 中文字幕av一区 二区| 亚洲天堂中文字幕| 石原莉奈一区二区三区在线观看| 奇米色777欧美一区二区| 国产精品91一区二区| 一本大道久久a久久精品综合| 色中色一区二区| 日韩美女一区二区三区四区| 欧美国产一区二区在线观看| 亚洲综合小说图片| 麻豆国产欧美日韩综合精品二区| 成人动漫一区二区| 91精品国产综合久久香蕉的特点| 久久久精品国产免大香伊| 一区二区欧美国产| 国产一区二区成人久久免费影院| 91香蕉视频在线| 精品久久久久香蕉网| 亚洲色图视频网站| 久久国产精品露脸对白| 欧美中文字幕亚洲一区二区va在线| 欧美xxxx老人做受| 亚洲综合视频在线观看| 成人综合婷婷国产精品久久免费| 欧美视频一区二区三区四区| 日本一区二区高清| 蜜乳av一区二区| 欧美网站一区二区| 亚洲视频免费观看| 国产精品一区三区| 日韩午夜在线影院| 亚洲国产综合人成综合网站| 成人午夜精品在线| 精品国产乱码久久久久久浪潮 | 在线观看一区二区精品视频| 日韩精品一区二区在线| 亚洲国产裸拍裸体视频在线观看乱了| 国产成人自拍网| 精品美女被调教视频大全网站| 亚洲一区二区三区中文字幕| caoporn国产一区二区| 久久精品欧美一区二区三区不卡 | 亚洲免费观看视频| 丁香激情综合五月| 国产夜色精品一区二区av| 久久精品国产久精国产爱| 欧美日韩国产在线播放网站| 一区二区三区电影在线播| av毛片久久久久**hd| 久久久亚洲精品一区二区三区| 日本va欧美va瓶| 91精品国产麻豆国产自产在线| 一区二区三区四区视频精品免费| jiyouzz国产精品久久| 国产精品免费视频一区| 成人免费观看av| 中文字幕精品在线不卡| 成人免费高清在线观看| 国产精品美女www爽爽爽| 成人免费高清视频| 中文字幕一区二区三| 94-欧美-setu| 亚洲宅男天堂在线观看无病毒| 欧美性xxxxxx少妇| 香港成人在线视频| 日韩小视频在线观看专区| 久久99国产精品麻豆| 国产日韩成人精品| 成人app在线| 一区二区三区.www| 欧日韩精品视频| 成人激情小说网站| 中文字幕一区二区三区四区| 成人国产精品视频| 一区二区三区不卡在线观看 | 中文字幕在线观看一区二区| 国产一区亚洲一区| 中文字幕日韩av资源站| 国产欧美日韩一区二区三区在线观看| 国产精品亚洲专一区二区三区 | 日韩一级片在线播放| 蜜桃久久久久久| 中文字幕第一区第二区| 色哟哟一区二区在线观看| 亚洲国产色一区| 欧美精品一区二区蜜臀亚洲| 91无套直看片红桃| 欧美aaa在线| 国产精品天天摸av网| 欧美日韩精品一区二区| 国产91在线看| 日日骚欧美日韩| 欧美高清在线精品一区| 在线91免费看| av电影天堂一区二区在线| 日韩精品视频网站| 国产精品福利在线播放| 欧美一区二区在线播放| 91在线国产福利| 久久电影网电视剧免费观看| 亚洲男人的天堂一区二区 | 国产传媒久久文化传媒| 亚洲国产一二三| 中文字幕免费不卡| 日韩欧美久久久| 91福利国产成人精品照片| 国产乱理伦片在线观看夜一区| 亚洲国产美女搞黄色| 国产精品久久国产精麻豆99网站| 91精品在线观看入口| 色婷婷一区二区三区四区| 国产福利一区二区三区在线视频| 亚洲动漫第一页| 亚洲另类在线制服丝袜| 中文字幕精品综合| 精品国产乱码久久久久久图片 | 欧美v日韩v国产v| 欧美性xxxxx极品少妇| jlzzjlzz亚洲日本少妇| 国产激情精品久久久第一区二区 | 欧美videos大乳护士334| 欧美视频在线播放| 色综合天天天天做夜夜夜夜做| 国产一区美女在线| 久久精品国产亚洲一区二区三区| 视频精品一区二区| 五月激情综合色| 首页综合国产亚洲丝袜| 午夜伊人狠狠久久| 日韩电影免费一区| 午夜电影一区二区三区| 日韩黄色在线观看| 日本一区中文字幕| 日本欧美韩国一区三区| 日韩av中文字幕一区二区| 午夜精品一区二区三区电影天堂 | 成年人午夜久久久| 99久久精品国产导航| 97精品国产97久久久久久久久久久久| 国产成人av电影免费在线观看| 国产精品一区不卡| jiyouzz国产精品久久| 91网页版在线| 欧美日免费三级在线| 欧美一区二区三区不卡| 久久这里只有精品首页| 国产午夜亚洲精品不卡| 成人免费一区二区三区在线观看| 中文字幕字幕中文在线中不卡视频| 亚洲男帅同性gay1069| 亚洲国产色一区| 男人的天堂亚洲一区| 国产精品一区2区| 日本精品视频一区二区| 制服丝袜在线91| 久久久久国产精品麻豆ai换脸| 欧美—级在线免费片| 一区二区三区四区五区视频在线观看| 亚洲va欧美va天堂v国产综合| 久久精品国产秦先生| av不卡一区二区三区| 欧美日韩成人高清| 国产欧美一区二区精品仙草咪| 亚洲日本电影在线| 美女视频第一区二区三区免费观看网站| 精品一区二区三区av| 色诱亚洲精品久久久久久| 日韩小视频在线观看专区| 中文字幕视频一区| 日韩av中文字幕一区二区| 99精品欧美一区二区三区综合在线| 欧美精三区欧美精三区| 国产精品丝袜久久久久久app| 午夜天堂影视香蕉久久| 成人的网站免费观看| 91精品国产综合久久久蜜臀粉嫩 | 久久影院视频免费| 亚洲精品水蜜桃| 国产精品亚洲第一|