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

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

?? pcamat.m

?? FastICA的Matlab程序
?? 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.)

% 16.6.2000
% Hugo G鋠ert

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Default values:
if nargin < 5, s_verbose = 'on'; end
if nargin < 4, s_interactive = 'off'; end
if nargin < 3, lastEig = size(vectors, 1); end
if 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));
end

switch 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));
end

oldDimension = 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));
  end
end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Calculate PCA

% Calculate the covariance matrix.
if b_verbose, fprintf ('Calculating covariance...\n'); end
covarianceMatrix = cov(vectors', 1);

maxLastEig = rank(covarianceMatrix, 1e-9);

% Calculate the eigenvalues and eigenvectors of covariance matrix.
[E, D] = eig(covarianceMatrix);

% Sort the eigenvalues - decending.
eigenvalues = flipud(sort(diag(D)));

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Interactive part - command-line
if 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 - GUI
if 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 enought

if lastEig > maxLastEig
  lastEig = maxLastEig;
  if b_verbose
    fprintf('Dimension reduced to %d due to the singularity of covariance matrix\n',...
           lastEig-firstEig+1);
  end
else
  % 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
  end
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Drop the smaller eigenvalues
if lastEig < oldDimension
  lowerLimitValue = (eigenvalues(lastEig) + eigenvalues(lastEig + 1)) / 2;
else
  lowerLimitValue = eigenvalues(oldDimension) - 1;
end

lowerColumns = diag(D) > lowerLimitValue;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Drop the larger eigenvalues
if firstEig > 1
  higherLimitValue = (eigenvalues(firstEig - 1) + eigenvalues(firstEig)) / 2;
else
  higherLimitValue = eigenvalues(1) + 1;
end
higherColumns = diag(D) < higherLimitValue;

% Combine the results from above
selectedColumns = lowerColumns & higherColumns;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% print some info for the user
if b_verbose
  fprintf ('Selected [ %d ] dimensions.\n', sum (selectedColumns));
end
if sum (selectedColumns) ~= (lastEig - firstEig + 1),
  error ('Selected a wrong number of dimensions.');
end

if 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 information
if 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.1998

if size(maskVector, 1) ~= size(oldMatrix, 2),
  error ('The mask vector and matrix are of uncompatible size.');
end

numTaken = 0;

for i = 1 : size (maskVector, 1),
  if maskVector(i, 1) == 1,
    takingMask(1, numTaken + 1) = i;
    numTaken = numTaken + 1;
  end
end

newMatrix = oldMatrix(:, takingMask);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩午夜在线播放| 91视频观看免费| 日韩欧美一区二区久久婷婷| 午夜精品久久久久久久久久| 欧美日产在线观看| 日韩av一级片| www国产精品av| 成人精品国产一区二区4080| 国产精品嫩草影院com| 91影视在线播放| 亚洲一区二区三区中文字幕| 欧美色视频一区| 精品伊人久久久久7777人| 久久亚洲二区三区| 99国产一区二区三精品乱码| 亚洲午夜激情网页| 久久蜜桃av一区精品变态类天堂| 懂色中文一区二区在线播放| 亚洲你懂的在线视频| 欧美男生操女生| 国内欧美视频一区二区| 国产精品嫩草久久久久| 欧美亚洲国产怡红院影院| 久久国产精品一区二区| 中文字幕av免费专区久久| 色婷婷国产精品| 九一九一国产精品| 琪琪一区二区三区| 欧美激情综合五月色丁香| 欧美亚洲综合久久| 国产福利91精品一区| 亚洲欧美日韩国产成人精品影院| 日韩一区二区三区视频| www.久久久久久久久| 日本伊人午夜精品| 中文字幕精品三区| 在线播放中文字幕一区| 成人午夜免费视频| 日本视频一区二区三区| 亚洲日本va午夜在线电影| 欧美一区二区成人6969| 色综合天天视频在线观看| 国精品**一区二区三区在线蜜桃| 亚洲蜜臀av乱码久久精品| 欧美精品一区二区三区蜜臀| 欧美性色黄大片| av一区二区三区| 国产专区欧美精品| 天天av天天翘天天综合网 | 国内不卡的二区三区中文字幕| 亚洲欧洲一区二区在线播放| 欧美大白屁股肥臀xxxxxx| 在线看日本不卡| 成人精品亚洲人成在线| 久久国产夜色精品鲁鲁99| 亚洲国产精品麻豆| 亚洲美女淫视频| 国产欧美一区二区三区网站| 欧美一区二区免费| 欧美日韩国产精选| 色综合久久中文综合久久97| 国产成人综合亚洲91猫咪| 免费看日韩精品| 日韩电影免费一区| 三级欧美韩日大片在线看| 一区二区三区日韩| 亚洲精品中文字幕在线观看| 国产精品卡一卡二| 国产女主播视频一区二区| 久久久亚洲综合| 精品粉嫩超白一线天av| 日韩免费高清电影| 日韩写真欧美这视频| 欧美老年两性高潮| 欧美日韩国产小视频| 欧美在线制服丝袜| 欧美色视频在线观看| 欧美精品日日鲁夜夜添| 欧美日韩国产影片| 91精品国产一区二区三区香蕉| 欧美日韩精品一区视频| 欧美久久婷婷综合色| 555夜色666亚洲国产免| 91精品婷婷国产综合久久| 日韩午夜激情av| 久久只精品国产| 国产清纯美女被跳蛋高潮一区二区久久w | www成人在线观看| 悠悠色在线精品| 亚洲妇女屁股眼交7| 喷水一区二区三区| 国产毛片精品国产一区二区三区| 风间由美一区二区av101 | 激情久久五月天| 国产宾馆实践打屁股91| 91美女视频网站| 欧美日韩国产色站一区二区三区| 欧美丰满美乳xxx高潮www| 精品久久久久久无| 日本一区二区视频在线| 亚洲欧美日韩成人高清在线一区| 亚洲一级在线观看| 美女视频免费一区| 国产91综合网| 色国产综合视频| 制服.丝袜.亚洲.另类.中文| 久久一夜天堂av一区二区三区| 中文字幕乱码久久午夜不卡| 一区二区三区四区国产精品| 日韩精品一区第一页| 国产综合久久久久影院| 一本到一区二区三区| 91精品国产综合久久精品| 国产精品私人影院| 日韩精品成人一区二区三区| 国产另类ts人妖一区二区| 欧美性视频一区二区三区| 久久青草国产手机看片福利盒子 | 东方欧美亚洲色图在线| 在线中文字幕一区二区| 欧美不卡在线视频| 亚洲精品中文在线| 久久av资源网| 色妞www精品视频| 26uuu亚洲综合色欧美| 亚洲精品你懂的| 国产成人av电影| 日韩精品一区二区三区视频播放 | eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 久久久蜜桃精品| 一区二区三区精品在线| 国产美女视频91| 在线播放欧美女士性生活| 亚洲少妇中出一区| 国产综合一区二区| 91精品国产福利在线观看| 亚洲丝袜制服诱惑| 国产成人在线电影| 日韩欧美中文字幕精品| 亚洲综合丁香婷婷六月香| 国v精品久久久网| 精品久久国产97色综合| 亚洲综合男人的天堂| jlzzjlzz亚洲女人18| 久久久亚洲午夜电影| 裸体在线国模精品偷拍| 欧美日韩综合在线| 亚洲精品免费一二三区| 粉嫩久久99精品久久久久久夜| 欧美tickling网站挠脚心| 午夜精品福利一区二区三区av| 91免费看`日韩一区二区| 国产欧美va欧美不卡在线| 国产一区二区视频在线| 亚洲精品大片www| 成人黄色在线视频| 久久五月婷婷丁香社区| 久久黄色级2电影| 欧美一区二区在线视频| 五月激情综合色| 欧美日韩在线三区| 亚洲成a人在线观看| 91成人看片片| 亚洲高清在线精品| 欧美日韩国产影片| 午夜精品视频在线观看| 在线观看91精品国产麻豆| 亚洲444eee在线观看| 欧美日韩高清一区二区不卡| 亚洲丰满少妇videoshd| 欧美丰满美乳xxx高潮www| 日本sm残虐另类| 欧美一区二区三区四区五区 | 国产一区999| 国产日韩欧美精品一区| 丁香婷婷综合五月| 国产精品萝li| 91视频免费播放| 亚洲成av人片在www色猫咪| 在线成人高清不卡| 老司机一区二区| 久久久久久黄色| 91亚洲精品一区二区乱码| 亚洲一级片在线观看| 日韩三级免费观看| 国产乱子轮精品视频| 亚洲欧洲国产日本综合| 欧美视频自拍偷拍| 久久99精品久久久| 中文字幕av资源一区| 在线观看国产日韩| 久久福利资源站| 中文字幕中文乱码欧美一区二区| 色婷婷av一区二区三区gif| 日本一不卡视频| 国产精品视频一二三区| 欧美在线观看视频一区二区三区| 日本不卡视频在线观看| 亚洲国产激情av| 欧美日韩亚洲综合一区二区三区|