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

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

?? som_linkage.m

?? it is matlab code , som(slef organizing map) tool for matlab
?? M
字號:
function [Z,order,Md] = som_linkage(sM,varargin)%SOM_LINKAGE Make a hierarchical linkage of the SOM map units.%% [Z,order,Dist] = som_linkage(sM, [[argID,] value, ...])%  %  Z = som_linkage(sM);%  Z = som_linkage(D,'complete');%  Z = som_linkage(sM,'single','ignore',find(~som_hits(sM,D)));%  Z = som_linkage(sM,pdist(sM.codebook,'mahal'));%  som_dendrogram(Z); %%  Input and output arguments ([]'s are optional):%   sM       (struct) map or data struct to be clustered%            (matrix) size dlen x dim, a data set: the matrix must not%                     contain any NaN's!%   [argID,  (string) See below. The values which are unambiguous can %    value]  (varies) be given without the preceeding argID.%%   Z        (matrix) size dlen-1 x 3, the linkage info%                     Z(i,1) and Z(i,2) hold the indeces of clusters %                     combined on level i (starting from bottom). The new%                     cluster has index dlen+i. The initial cluster %                     index of each unit is its linear index in the %                     original data matrix. Z(i,3) is the distance%                     between the combined clusters. See LINKAGE%                     function in the Statistics Toolbox.%                     The ignored samples are listed at the %                     end of the Z-matrix and have Z(*,3) == Inf%   Dist     (matrix) size dlen x dlen, pairwise distance matrix%% Here are the valid argument IDs and corresponding values. The values % which are unambiguous (marked with '*') can be given without the% preceeding argID.%   'linkage' *(string) the linkage criteria to use: 'single' (the%                       default), 'average' or 'complete' %   'topol'   *(struct) topology struct%   'connect' *(string) 'neighbors' or 'any' (default), whether the%                       connections should be allowed only between %                       neighbors or between any vectors%              (matrix) size dlen x dlen indicating the connections%                       between vectors%              (scalar) the N-neighborhood upto which the connections%                       should be formed (implies 'neighbors')%   'ignore'   (vector) the units/vectors which should be ignored %   'dist'     (matrix) size dlen x dlen, pairwise distance matrix to %                       be used instead of euclidian distances%              (vector) as the output of PDIST function%              (scalar) distance norm to use (euclidian = 2)%   'mask'     (vector) size dim x 1, the search mask used to %                       weight distance calculation. By default %                       sM.mask or a vector of ones is used.%% Note that together 'connect'='neighbors' and 'ignore' may form% areas on the map which will never be connected: connections% across the ignored map units simply do not exist.%% See also KMEANS_CLUSTERS, LINKAGE, PDIST, DENDROGRAM. % Copyright (c) 2000 by Juha Vesanto% Contributed to SOM Toolbox on June 16th, 2000 by Juha Vesanto% http://www.cis.hut.fi/projects/somtoolbox/ % Version 2.0beta juuso 160600%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input arguments% the dataif isstruct(sM),   if isfield(sM,'data'), D = sM.data; sT = []; mask = [];   else D = sM.codebook; sT = sM.topol; mask = sM.mask;  endelse  D = sM; sT = []; mask = []; end[dlen dim] = size(D);if isempty(mask), mask = ones(dim,1); endif any(isnan(D(:))), error('Data matrix must not have any NaNs.'); end% vararginMd = 2; linkage = 'single';ignore_units = []; constrained = 0;i=1; while i<=length(varargin),   argok = 1;   if ischar(varargin{i}),     switch varargin{i},       % argument IDs     case {'topol','som_topol','sTopol'}, i=i+1; sT = varargin{i};     case 'connect', i=i+1;        if ischar(varargin{i}), constrained = ~strcmp(varargin{i},'any');       else constrained = varargin{i}; end     case 'ignore',  i=i+1; ignore_units = varargin{i};      case 'dist',    i=i+1; Md = varargin{i};     case 'linkage', i=i+1; linkage = varargin{i};     case 'mask',    i=i+1; mask = varargin{i};     case 'tracking',i=i+1; tracking = varargin{i};       % unambiguous values     case 'neighbors', constrained = 1;      case 'any',       constrained = 0;      case {'single','average','complete'}, linkage = varargin{i};     otherwise argok=0;     end  elseif isstruct(varargin{i}) & isfield(varargin{i},'type'),     switch varargin{i}(1).type,      case 'som_topol', sTopol = varargin{i};      otherwise argok=0;     end  else    argok = 0;   end  if ~argok,     disp(['(som_linkage) Ignoring invalid argument #' num2str(i+1)]);   end  i = i+1; end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% distance matrix% given distance matrix % jh corrected this place totally 27.3. 03if (prod(size(Md))==1), % no explicit distance matrix, set flag  q=2; % 17.2.03 kr added some bracketselse  if (prod(size(Md))<dlen^2), % check pdist form    Md = squareform(Md);   % transform to ordinary square diastance matrix  end  % jh: 27.3. 03 "calculate pairwise dist. matrix" see approx. 20 lines below  % sets self-distance to Inf! This must be set here also,  % otherwise clustering fails for user defined dist. matrix!   Md(eye(dlen)==1)=Inf; end% neighborhood constraintif length(constrained)==1 & constrained>0,   Ne1 = som_unit_neighs(sT);   Conn = som_neighborhood(Ne1,constrained);   Conn(~isfinite(Conn(:))) = 0; else Conn = constrained; endif ~isempty(Conn), for i=1:dlen, C(i,i) = 1; end, end% pairwise distance matrix across connected unitsn = size(D,1);if prod(size(Md))>1,     % remove distances between non-neighbors  if constrained, for i = 1:n, Md(i,find(Conn(i,:)==0)) = Inf; end, endelse      % calculate pairwise distance matrix  q = Md;   Md = zeros(n,n)+Inf;  if ~constrained & q==2, % fast for the default case     for i = 1:n-1,      x = D(i,:);      inds = [(i+1):n];       Diff = D(inds,:) - x(ones(n-i,1),:);      Md(inds,i) = sqrt((Diff.^2)*mask);      Md(i,inds) = Md(inds,i)';    end    else    for i = 1:n-1,       inds = find(Conn(i,:)==1);       inds = inds(find(inds>i));       Diff = abs(D(inds,:) - D(i*ones(length(inds),1),:));      switch q,        case 1,    dist = Diff*mask;       case 2,    dist = sqrt((Diff.^2)*mask);       case Inf,  dist = max(Diff,[],2);       otherwise, dist = ((Diff.^q)*mask).^(1/q);      end      Md(inds,i) = dist;       Md(i,inds) = dist';     end  endend% set distances to ignored units to Infif ~isempty(ignore_units),   Md(ignore_units,:) = Inf;  Md(:,ignore_units) = Inf;end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% construct dendrogramZ = zeros(n-1,3)+NaN;  % merged clusters and distance for each stepclusters = 1:dlen;     % each vector is at first in its own clusterCd = Md;               % distances between clustersh = waitbar(0,'Constructing hierarchical clustering');   for i=1:n-1,     % tracking  waitbar(i/(n-1),h);   %% combine two closest clusters    % find the clusters which are closest to each other (c1 and c2)  [d,ind] = min(min(Cd));    if ~isfinite(d), break; end   % no more connected clusters  [d,c1] = min(Cd(:,ind));      % cluster1  c2 = clusters(ind);           % cluster2      % combine the two clusters  c1_inds = find(clusters==c1); % vectors belonging to c1  c2_inds = find(clusters==c2); % vectors belonging to c2  c_inds = [c1_inds, c2_inds];  % members of the new cluster    % new cluster index = bigger cluster  if length(c2_inds)>length(c1_inds), c=c2; k=c1; else c=c1; k=c2; end  clusters(c_inds) = c;         % update cluster info  Z(i,:) = [c, k, d];           % save info into Z    %% update cluster distances    % remove the subclusters from the Cd table    Cd(c_inds,c_inds) = Inf;      % distance of the cluster to its members = Inf  k_inds = c_inds(c_inds ~= c); % vectors of the smaller cluster  Cd(k_inds,:) = Inf;           % distance of the subclusters to   Cd(:,k_inds) = Inf;           % other clusters = Inf  % update the distance of this cluster to the other clusters  cl = unique(clusters(clusters ~= c)); % indeces of all other clusters  if ~isempty(cl), % added since v6.5 works differently than 6.1    for l=cl,         o_inds = find(clusters==l); % indeces belonging to cluster k      vd = Md(c_inds,o_inds);     % distances between vectors in c and k      vd = vd(isfinite(vd(:)));   % remove infinite distances (no connection)      len = length(vd);      if ~len, % if the two clusters are not connected, their distance in Inf	sd = Inf;      else   % otherwise, calculate the distance between them	switch linkage,	 case 'single',   sd = min(vd);	 case 'average',  sd = sum(vd)/len; 	 case 'complete', sd = max(vd);	 otherwise, error(['Unknown set distance: ' linkage]);	end      end      Cd(c,l) = sd; Cd(l,c) = sd;    end    endendclose(h); last = Z(i,1); if isnan(last),   last = Z(i-1,1);   rest = setdiff(unique(clusters),last);   Z(i:n-1,1) = rest';   Z(i:n-1,2) = last;   Z(i:n-1,3) = Inf;   i = i - 1; else   rest = []; end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% return values% calculate the order of samplesorder = last; % go through the combination matrix from top to downfor k=i:-1:1,   c = Z(k,1); k = Z(k,2);                     % what (k) change to what (c)  j = find(order==c);                         % the occurance of c in order      if j == length(order), order = [order k];   % put k behind c  else order = [order(1:j) k order(j+1:end)];   endend  order = [rest, order]; % to maintain compatibility with Statistics Toolbox, the values in % Z must be yet transformed so that they are similar to the output% of LINKAGE functionZs = Z;current_cluster = 1:dlen;for i=1:size(Z,1),  Zs(i,1) = current_cluster(Z(i,1));  Zs(i,2) = current_cluster(Z(i,2));  current_cluster(Z(i,[1 2])) = dlen+i;  endZ = Zs;return;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人妖精视频yjsp地址| 韩国精品久久久| 久久精品人人做| 欧美午夜精品一区| 国产精品亚洲а∨天堂免在线| 亚洲色图欧洲色图婷婷| 精品久久久久久无| 欧美日韩国产区一| 国产91高潮流白浆在线麻豆 | 亚洲欧美激情一区二区| 欧美电影精品一区二区| 在线视频观看一区| 中文在线一区二区| 一本色道a无线码一区v| 亚洲免费在线播放| 亚洲免费三区一区二区| 国产拍揄自揄精品视频麻豆| 91麻豆精品91久久久久同性| 色久综合一二码| 成人美女视频在线看| 久久国产夜色精品鲁鲁99| 亚洲成a人在线观看| 国产精品久久毛片a| 久久久天堂av| 精品日韩一区二区三区免费视频| 9191国产精品| 精品视频1区2区3区| 一本在线高清不卡dvd| 成人网男人的天堂| 国产福利一区在线| 国产精品综合在线视频| 久久精品国产亚洲a| 日韩成人av影视| 亚洲va韩国va欧美va精品| 亚洲欧美一区二区三区久本道91| 久久久夜色精品亚洲| 日韩精品一区在线| 欧美一区二区女人| 制服丝袜亚洲网站| 久久精品亚洲一区二区三区浴池| 国模套图日韩精品一区二区| 亚洲444eee在线观看| 久久噜噜亚洲综合| 色屁屁一区二区| 黑人巨大精品欧美黑白配亚洲| 2019国产精品| 欧美伊人精品成人久久综合97| 九九精品视频在线看| 欧美一区二区三区日韩视频| 国产精品区一区二区三区| 免费观看一级欧美片| 亚洲国产精品二十页| 国产精品福利一区二区| 成人欧美一区二区三区白人| 亚洲婷婷综合色高清在线| 亚洲日本在线看| 亚洲成人免费在线| 奇米精品一区二区三区四区 | 91精品国产美女浴室洗澡无遮挡| 欧美日韩国产综合一区二区三区 | 久久99久久久欧美国产| 韩国精品一区二区| 岛国av在线一区| 色偷偷成人一区二区三区91| 欧美日韩国产系列| 日韩免费电影网站| 欧美高清一级片在线观看| 亚洲精品国产a| 日产国产高清一区二区三区| 久久精品99国产精品| 国产成人99久久亚洲综合精品| 成人动漫一区二区三区| 欧美在线免费观看亚洲| 欧美一区二区三区四区高清| 国产亚洲一区二区三区| 亚洲欧美视频在线观看| 免费在线观看不卡| 成人一区在线看| 欧美亚洲尤物久久| 久久久精品日韩欧美| 亚洲欧美一区二区不卡| 捆绑调教一区二区三区| av不卡在线播放| 欧美一区二区日韩一区二区| 国产精品丝袜黑色高跟| 午夜精品福利一区二区蜜股av | 欧美精品日韩一本| 国产亚洲欧美中文| 国产精品你懂的| 国产不卡视频一区| 国产亚洲精久久久久久| 亚洲综合一二区| 国产酒店精品激情| 欧美影院一区二区三区| 精品粉嫩超白一线天av| 一区二区三区在线视频播放| 国产在线播放一区二区三区| 91亚洲精品久久久蜜桃| 久久精品一区二区三区av| 91蝌蚪porny九色| 99久久精品费精品国产一区二区| 精品视频在线免费看| 国产欧美日韩三区| 日韩国产欧美在线播放| 91丝袜呻吟高潮美腿白嫩在线观看| 日韩亚洲欧美综合| 国产精品久久久久国产精品日日| 日韩精品福利网| 在线观看国产91| 国产精品欧美一级免费| 久久se这里有精品| 欧美三级三级三级| 亚洲伦理在线精品| 丁香啪啪综合成人亚洲小说| 欧美一二三四在线| 亚洲v日本v欧美v久久精品| kk眼镜猥琐国模调教系列一区二区 | 亚洲成人www| 色综合久久综合网| 国产精品区一区二区三| 国产一区二区剧情av在线| 欧美放荡的少妇| 亚洲国产精品麻豆| 一本色道久久综合亚洲91| 国产精品久久久久久久久免费相片| 蜜桃精品在线观看| 制服丝袜亚洲网站| 视频精品一区二区| 欧美日韩一二区| 亚洲国产精品嫩草影院| 欧美影院一区二区三区| 亚洲一区精品在线| 欧洲精品一区二区三区在线观看| 中文字幕在线一区免费| 不卡的电视剧免费网站有什么| 久久精品亚洲精品国产欧美kt∨ | 国产东北露脸精品视频| 久久综合九色综合97婷婷| 久久精品国产精品亚洲精品| 欧美日韩精品免费观看视频| 一区二区三区成人在线视频| 色婷婷综合在线| 一区二区三区av电影| 欧美三级欧美一级| 日韩电影一区二区三区| 欧美大片免费久久精品三p| 国产精品第一页第二页第三页| 日本精品裸体写真集在线观看| 国产自产高清不卡| 色偷偷一区二区三区| 久久66热偷产精品| 一区二区三区中文字幕电影| 国产亚洲欧美日韩在线一区| 在线播放欧美女士性生活| 成人av一区二区三区| 国内精品伊人久久久久av影院| 亚洲女人的天堂| 日本一区二区不卡视频| 久久一区二区三区国产精品| 日韩免费看网站| 久久99深爱久久99精品| 国产午夜精品久久久久久久| 成熟亚洲日本毛茸茸凸凹| 亚洲人成网站色在线观看| 在线视频一区二区三| 视频在线在亚洲| 在线观看日韩一区| 首页国产欧美久久| 国产视频一区在线播放| 91蜜桃免费观看视频| 亚洲国产一二三| 精品国免费一区二区三区| 国产黄色精品网站| 亚洲一区二区av电影| 26uuu亚洲婷婷狠狠天堂| 国产精品888| 亚洲bt欧美bt精品| 精品国产乱码久久| 91成人在线观看喷潮| 精品午夜久久福利影院| 国产精品盗摄一区二区三区| 欧美精品vⅰdeose4hd| 久久99国产精品久久99果冻传媒| 国产精品久久久久久久裸模| 欧美喷水一区二区| 国产精品中文欧美| 三级久久三级久久久| 久久久高清一区二区三区| 欧美日韩高清一区二区三区| 国产精品一级二级三级| 一区二区三区中文在线观看| 日韩精品中文字幕在线不卡尤物 | 国产在线精品一区在线观看麻豆| 国产欧美日韩在线观看| 欧美嫩在线观看| 国产在线不卡一区| 五月婷婷综合激情| 中文字幕一区二区日韩精品绯色| 51精品国自产在线| 色婷婷综合久久久|