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

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

?? linkage.m

?? This manual describes how to run the Matlab&reg Artificial Immune Systems tutorial presentation deve
?? M
字號:
function Z = linkage(Y, method)
%LINKAGE Hierarchical cluster information.
%   LINKAGE(Y) computes the hierarchical cluster information, using the
%   single linkage algorithm, from a given distance matrix Y generated
%   by PDIST. Y is also commonly known as similarity or
%   dissimilarity matrix.
%
%   LINKAGE(Y, method) computes the hierarchical cluster information using
%   the specified algorithm. The available methods are:
%
%      'single'   --- nearest distance
%      'complete' --- furthest distance
%      'average'  --- average distance
%      'centroid' --- center of mass distance
%      'ward'     --- inner squared distance
%
%   Cluster information will be returned in the matrix Z with size m-1
%   by 3.  Column 1 and 2 of Z contain cluster indices linked in pairs
%   to form a binary tree. The leaf nodes are numbered from 1 to
%   m. They are the singleton clusters from which all higher clusters
%   are built. Each newly-formed cluster, corresponding to Z(i,:), is
%   assigned the index m+i, where m is the total number of initial
%   leaves. Z(i,1:2) contains the indices of the two component
%   clusters which form cluster m+i. There are n-1 higher clusters
%   which correspond to the interior nodes of the output clustering
%   tree. Z(i,3) contains the corresponding linkage distances between
%   the two clusters which are merged in Z(i,:), e.g. if there are
%   total of 30 initial nodes, and at step 12, cluster 5 and cluster 7
%   are combined and their distance at this time is 1.5, then row 12
%   of Z will be (5,7,1.5). The newly formed cluster will have an
%   index 12+30=42. If cluster 42 shows up in a latter row, that means
%   this newly formed cluster is being combined again into some bigger
%   cluster.
%
%   See also PDIST, INCONSISTENT, COPHENET, DENDROGRAM, CLUSTER, CLUSTERDATA

%   ZP You, 3-10-98
%   Copyright (c) 1993-98 by The MathWorks, Inc.
%   $Revision: 1.4 $

[k, n] = size(Y);

if n < 3
  error('You have to have at least three distances to do a linkage.');
end
  

m = (1+sqrt(1+8*n))/2;
if k ~= 1 | m ~= fix(m)
  error('The first input has to match the output of the PDIST function in size.');   
end

if nargin == 1 % set default switch to be 's' 
   method = 'si';
end

if length(method) < 2
   error('The switch given by the second argument is not defined.');
end

method = lower(method(1:2)); % simplify the switch string.

Z = zeros(m-1,3); % allocate the output matrix.

% during updating clusters, cluster index is constantly changing, R is
% a index vector mapping the original index to the current (row
% column) index in X.  N denotes how many points are contained in each
% cluster.

N = zeros(1,2*m-1);
N(1:m) = 1;
n = m; % since m is changing, we need to save m in n. 
R = 1:n;

if method == 'ce'  % square the X so that it is easier to update.
   Y = Y .* Y;
elseif method == 'wa'
   Y = Y .* Y/2;
end

for s = 1:(n-1)
   if method == 'av'
      p = (m-1):-1:2;
      I = zeros(m*(m-1)/2,1);
      I(cumsum([1 p])) = 1;
      I = cumsum(I);
      J = ones(m*(m-1)/2,1);
      J(cumsum(p)+1) = 2-p;
      J(1)=2;
      J = cumsum(J);
      W = N(R(I)).*N(R(J));
      X = Y./W;   
   else
      X = Y;
   end
   
   [v, k] = min(X);
   if method == 'ce'
      v = sqrt(v);
   end
   
   i = floor(m+1/2-sqrt(m^2-m+1/4-2*(k-1)));
   j = k - (i-1)*(m-i/2)+i;
   
   Z(s,:) = [R(i) R(j) v]; % update one more row to the output matrix A
   
   % update X, in order to vectorize the computation, we need to compute
   % all the index corresponds to cluster i and j in X, denoted by I and J.
   I1 = 1:(i-1); I2 = (i+1):(j-1); I3 = (j+1):m; % these are temp variables.
   U = [I1 I2 I3];
   I = [I1.*(m-(I1+1)/2)-m+i i*(m-(i+1)/2)-m+I2 i*(m-(i+1)/2)-m+I3];
   J = [I1.*(m-(I1+1)/2)-m+j I2.*(m-(I2+1)/2)-m+j j*(m-(j+1)/2)-m+I3];
   
   switch method
   case 'si' %single linkage
      Y(I) = min(Y(I),Y(J));
   case 'av' % average linkage
      Y(I) = Y(I) + Y(J);
   case 'co' %complete linkage
      Y(I) = max(Y(I),Y(J));
   case 'ce' % centroid linkage
      K = N(R(i))+N(R(j));
      Y(I) = (N(R(i)).*Y(I)+N(R(j)).*Y(J)-(N(R(i)).*N(R(j))*v^2)./K)./K;
   case 'wa'
      Y(I) = ((N(R(U))+N(R(i))).*Y(I) + (N(R(U))+N(R(j))).*Y(J) - ...
	  N(R(U))*v)./(N(R(i))+N(R(j))+N(R(U)));
   otherwise error('method not recognized.');
   end
   J = [J i*(m-(i+1)/2)-m+j];
   Y(J) = []; % no need for the cluster information about j.
   
   % update m, N, R
   m = m-1; 
   N(n+s) = N(R(i)) + N(R(j));
   R(i) = n+s;
   R(j:(n-1))=R((j+1):n); 
end

if method == 'wa'
   Z(:,3) = sqrt(Z(:,3));
end

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美精品v国产精品v日韩精品| 亚洲午夜精品久久久久久久久| 蜜臀av国产精品久久久久| 777精品伊人久久久久大香线蕉| 午夜精品福利一区二区蜜股av| 欧美日韩国产综合视频在线观看 | 91一区二区三区在线播放| 中文字幕亚洲欧美在线不卡| 91在线丨porny丨国产| 亚洲综合精品久久| 日韩一区二区免费电影| 国产在线精品一区在线观看麻豆| 国产片一区二区| 91传媒视频在线播放| 日韩成人一区二区| 国产三级久久久| 日本高清不卡在线观看| 日日摸夜夜添夜夜添精品视频| 日韩欧美国产综合| 东方欧美亚洲色图在线| 亚洲一区二区精品久久av| 日韩精品中文字幕一区| 成人黄色大片在线观看| 夜色激情一区二区| 欧美zozo另类异族| 91在线精品秘密一区二区| 日韩国产在线一| 国产精品美女久久久久久| 欧美视频一区二区在线观看| 狠狠色综合色综合网络| 亚洲欧美国产三级| 精品日韩欧美在线| 在线观看欧美日本| 国产一区二区精品久久99| 一区二区三区蜜桃| 宅男在线国产精品| 91丨porny丨国产| 国内外精品视频| 亚洲成人动漫av| 欧美国产精品v| 91精品国产免费| 99久久国产综合色|国产精品| 日本视频中文字幕一区二区三区| 中文av一区特黄| 精品国产麻豆免费人成网站| 欧美亚洲图片小说| 不卡的av电影| 国产在线不卡一卡二卡三卡四卡| 夜夜嗨av一区二区三区| 中文字幕av在线一区二区三区| 欧美一区二区三区视频| 一本到不卡免费一区二区| 国产成人在线视频网站| 麻豆精品在线观看| 五月婷婷另类国产| 一区二区三区欧美| 亚洲欧美色图小说| 国产精品人成在线观看免费 | 欧美日韩在线三级| 99国产欧美另类久久久精品| 国产成人亚洲精品狼色在线 | 悠悠色在线精品| 国产精品久久三区| 国产欧美日韩视频一区二区| 久久综合九色综合97婷婷女人| 在线不卡a资源高清| 欧美三区在线观看| 欧美伊人久久大香线蕉综合69| av电影天堂一区二区在线| 国产成人夜色高潮福利影视| 国产精品一区二区男女羞羞无遮挡 | 欧美日本在线播放| 成av人片一区二区| jlzzjlzz国产精品久久| k8久久久一区二区三区| 91在线一区二区三区| 99国产精品久久久久久久久久| 粉嫩aⅴ一区二区三区四区五区| 国产精品一二三在| 国产91高潮流白浆在线麻豆| 国产成人一级电影| 成人精品小蝌蚪| 99麻豆久久久国产精品免费优播| av一本久道久久综合久久鬼色| 9i在线看片成人免费| 色婷婷av一区| 欧美日韩精品专区| 日韩午夜电影av| 欧美电影免费提供在线观看| 久久久久亚洲蜜桃| 欧美高清在线视频| 亚洲精品视频免费观看| 亚洲国产精品久久人人爱| 日韩va欧美va亚洲va久久| 久久99精品国产麻豆婷婷洗澡| 国产美女精品一区二区三区| 不卡一区二区三区四区| 欧美最新大片在线看 | 激情六月婷婷综合| 国产成人在线网站| 色琪琪一区二区三区亚洲区| 欧美日韩精品一区二区三区四区 | 日韩主播视频在线| 激情图片小说一区| 91丨九色丨黑人外教| 91精品欧美久久久久久动漫| 26uuu国产日韩综合| ●精品国产综合乱码久久久久| 亚洲欧美电影一区二区| 青青草伊人久久| 成人丝袜高跟foot| 欧美人体做爰大胆视频| 久久久久久久精| 亚洲观看高清完整版在线观看| 老司机精品视频在线| a4yy欧美一区二区三区| 日韩欧美一级二级三级| 最新不卡av在线| 久久99国产精品免费网站| 91猫先生在线| 久久久夜色精品亚洲| 亚洲一区二区免费视频| 国产91丝袜在线18| 在线播放一区二区三区| 国产精品国产三级国产普通话99| 日韩中文字幕区一区有砖一区| 成人中文字幕电影| 日韩一级大片在线| 一区二区三区日本| 国产成人精品免费视频网站| 欧美裸体bbwbbwbbw| 一区在线观看视频| 国精品**一区二区三区在线蜜桃| 欧美中文字幕一区二区三区| 国产午夜精品一区二区三区视频| 五月天一区二区| 99久久综合狠狠综合久久| 亚洲精品在线免费播放| 亚洲成va人在线观看| 99久久精品国产导航| 国产欧美综合色| 裸体一区二区三区| 欧美日韩成人综合天天影院| 成人免费小视频| 成人一二三区视频| 久久一区二区视频| 六月丁香综合在线视频| 欧美日韩久久一区| 艳妇臀荡乳欲伦亚洲一区| 成人97人人超碰人人99| 国产婷婷一区二区| 国产一区视频网站| 精品美女在线播放| 久久不见久久见免费视频1| 欧美日本一道本在线视频| 亚洲自拍偷拍图区| 91麻豆国产香蕉久久精品| 中文字幕一区二区三区四区| 成人午夜碰碰视频| 国产欧美1区2区3区| 国产一区二区精品久久91| 日韩欧美亚洲一区二区| 免费看日韩精品| 欧美一卡2卡3卡4卡| 免费在线看成人av| 日韩区在线观看| 久久精品国产精品亚洲精品| 日韩欧美国产小视频| 久久99在线观看| 久久亚洲二区三区| 国产精品资源在线观看| 国产人妖乱国产精品人妖| 国产成人8x视频一区二区 | 亚洲男人天堂一区| 色婷婷av一区二区三区gif| 一区二区视频在线看| 欧美日韩五月天| 天堂蜜桃一区二区三区| 日韩视频一区在线观看| 久久精品国产一区二区三| 欧美精品一区二区三区久久久| 国产伦精一区二区三区| 国产精品美女久久福利网站| 91蝌蚪porny成人天涯| 亚洲国产cao| 精品日产卡一卡二卡麻豆| 国产suv精品一区二区883| 中文字幕中文字幕在线一区| 色婷婷精品久久二区二区蜜臂av | 国产欧美视频在线观看| av一二三不卡影片| 性做久久久久久免费观看| 91精品国产综合久久久久久| 国产麻豆欧美日韩一区| 中文字幕一区二区三区乱码在线| 欧美在线免费视屏| 精品一区二区三区在线播放| 国产精品短视频| 在线播放日韩导航| 国产91精品一区二区麻豆亚洲|