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

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

?? som_bmus.m

?? it is matlab code , som(slef organizing map) tool for matlab
?? M
字號:
function [Bmus,Qerrors] = som_bmus(sMap, sData, which_bmus, mask)%SOM_BMUS Find the best-matching units from the map for the given vectors.%% [Bmus, Qerrors] = som_bmus(sMap, sData, [which], [mask])% %   bmus = som_bmus(sM,sD);%   [bmus,qerrs] = som_bmus(sM,D,[1 2 3]);%   bmus = som_bmus(sM,D,1,[1 1 0 0 1]);%%  Input and output arguments ([]'s are optional): %   sMap     (struct) map struct%            (matrix) codebook matrix, size munits x dim%   sData    (struct) data struct%            (matrix) data matrix, size dlen x dim%   [which]  (vector) which BMUs are returned, [1] by default %            (string) 'all', 'best' or 'worst' meaning [1:munits],%                     [1] and [munits] respectively  %   [mask]   (vector) mask vector, length=dim, sMap.mask by default%%   Bmus     (matrix) the requested BMUs for each data vector, %                     size dlen x length(which)%   Qerrors  (matrix) the corresponding quantization errors, size as Bmus%% NOTE: for a vector with all components NaN's, bmu=NaN and qerror=NaN% NOTE: the mask also effects the quantization errors%% For more help, try 'type som_bmus' or check out online documentation.% See also  SOM_QUALITY.%%%%%%%%%%%%% DETAILED DESCRIPTION %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% som_bmus%% PURPOSE%% Finds Best-Matching Units (BMUs) for given data vector from a given map.%% SYNTAX%%  Bmus = som_bmus(sMap, sData)%  Bmus = som_bmus(..., which)%  Bmus = som_bmus(..., which, mask)%  [Bmus, Qerrs] = som_bmus(...)%% DESCRIPTION%% Returns the indexes and corresponding quantization errors of the% vectors in sMap that best matched the vectors in sData.%% By default only the index of the best matching unit (/vector) is% returned, but the 'which' argument can be used to get others as% well. For example it might be desirable to get also second- and% third-best matching units as well (which = [1:3]). %% A mask can be used to weight the search process. The mask is used to% weight the influence of components in the distance calculation, as% follows: %%   distance(x,y) = (x-y)' diag(mask) (x-y)%% where x and y are two vectors, and diag(mask) is a diagonal matrix with % the elements of mask vector on the diagonal. %% The vectors in the data set (sData) can contain unknown components% (NaNs), but the map (sMap) cannot. If there are completely empty% vectors (all NaNs), the returned BMUs and quantization errors for those % vectors are NaNs.%% REQUIRED INPUT ARGUMENTS%%   sMap              The vectors from among which the BMUs are searched%                     for. These must not have any unknown components (NaNs).%            (struct) map struct%            (matrix) codebook matrix, size munits x dim%                     %   sData             The data vector(s) for which the BMUs are searched.%            (struct) data struct%            (matrix) data matrix, size dlen x dim%% OPTIONAL INPUT ARGUMENTS %%   which    (vector) which BMUs are returned, %                     by default only the best (ie. which = [1])%            (string) 'all', 'best' or 'worst' meaning [1:munits],%                     [1] and [munits] respectively  %   mask     (vector) mask vector to be used in BMU search, %                     by default sMap.mask, or ones(dim,1) in case%                     a matrix was given%% OUTPUT ARGUMENTS% %   Bmus     (matrix) the requested BMUs for each data vector, %                     size dlen x length(which)%   Qerrors  (matrix) the corresponding quantization errors, %                     size equal to that of Bmus%% EXAMPLES%% Simplest case:%  bmu = som_bmus(sM, [0.3 -0.4 1.0]);%           % 3-dimensional data, returns BMU for vector [0.3 -0.4 1]%  bmu = som_bmus(sM, [0.3 -0.4 1.0], [3 5]);%           % as above, except returns the 3rd and 5th BMUs%  bmu = som_bmus(sM, [0.3 -0.4 1.0], [], [1 0 1]);%           % as above, except ignores second component in searching%  [bmus qerrs] = som_bmus(sM, D);%           % returns BMUs and corresponding quantization errors %           % for each vector in D%  bmus = som_bmus(sM, sD);%           % returns BMUs for each vector in sD using the mask in sM%% SEE ALSO% %  som_quality      Measure the quantization and topographic error of a SOM.% Copyright (c) 1997-2000 by the SOM toolbox programming team.% http://www.cis.hut.fi/projects/somtoolbox/% Version 1.0beta juuso 071197, 101297 % Version 2.0alpha juuso 201198 080200%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% check arguments and initializeerror(nargchk(1, 4, nargin));  % check no. of input args is correct% sMapif isstruct(sMap),   switch sMap.type,    case 'som_map', M = sMap.codebook;    case 'som_data', M = sMap.data;   otherwise, error('Invalid 1st argument.');  endelse   M = sMap; end[munits dim] = size(M);if any(any(isnan(M))),   error ('Map codebook must not have missing components.');end% dataif isstruct(sData),   switch sData.type,    case 'som_map', D = sData.codebook;   case 'som_data', D = sData.data;   otherwise, error('Invalid 2nd argument.');  endelse   D = sData;end[dlen ddim] = size(D);if dim ~= ddim,   error('Data and map dimensions do not match.')end% which_bmusif nargin < 3 | isempty(which_bmus) | any(isnan(which_bmus)),   which_bmus = 1; else  if ischar(which_bmus),     switch which_bmus,     case 'best', which_bmus = 1;      case 'worst', which_bmus = munits;      case 'all', which_bmus = [1:munits];    end  endend% maskif nargin < 4 | isempty(mask) | any(isnan(mask)),   if isstruct(sMap) & strcmp(sMap.type,'som_map'),     mask = sMap.mask;   elseif isstruct(sData) & strcmp(sData.type,'som_map'),     mask = sData.mask;   else    mask = ones(dim,1);   endendif size(mask,1)==1, mask = mask'; endif all(mask == 0),   error('All components masked off. BMU search cannot be done.');end%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% actionBmus = zeros(dlen,length(which_bmus));Qerrors = Bmus;% The BMU search involves calculating weighted Euclidian distances % to all map units for each data vector. Basically this is done as%   for i=1:dlen, %     for j=1:munits, %       for k=1:dim,%         Dist(j,i) = Dist(j,i) + mask(k) * (D(i,k) - M(j,k))^2;%       end%     end%   end% where mask is the weighting vector for distance calculation. However, taking % into account that distance between vectors m and v can be expressed as%   |m - v|^2 = sum_i ((m_i - v_i)^2) = sum_i (m_i^2 + v_i^2 - 2*m_i*v_i)% this can be made much faster by transforming it to a matrix operation:%   Dist = (M.^2)*mask*ones(1,d) + ones(m,1)*mask'*(D'.^2) - 2*M*diag(mask)*D'%% In the case where there are unknown components in the data, each data% vector will have an individual mask vector so that for that unit, the % unknown components are not taken into account in distance calculation.% In addition all NaN's are changed to zeros so that they don't screw up % the matrix multiplications.% calculate distances & bmus% This is done a block of data at a time rather than in a% single sweep to save memory consumption. The 'Dist' matrix has % size munits*blen which would be HUGE if you did it in a single-sweep% operation. If you _want_ to use the single-sweep version, just % set blen = dlen. If you're having problems with memory, try to % set the value of blen lower. blen = min(munits,dlen);% handle unknown componentsKnown = ~isnan(D);W1 = (mask*ones(1,dlen)) .* Known'; D(find(~Known)) = 0;  unknown = find(sum(Known')==0); % completely unknown vectors % constant matricesWD = 2*diag(mask)*D';   % constant matrixdconst = ((D.^2)*mask); % constant term in the distancesi0 = 0; while i0+1<=dlen,   % calculate distances   inds = [(i0+1):min(dlen,i0+blen)]; i0 = i0+blen;        Dist = (M.^2)*W1(:,inds) - M*WD(:,inds); % plus dconst for each sample    % find the bmus and the corresponding quantization errors  if all(which_bmus==1), [Q B] = min(Dist); else [Q B] = sort(Dist); end  if munits==1, Bmus(inds,:) = 1; else Bmus(inds,:) = B(which_bmus,:)'; end  Qerrors(inds,:) = Q(which_bmus,:)' + dconst(inds,ones(length(which_bmus),1));end  % completely unknown vectorsif ~isempty(unknown),   Bmus(unknown,:) = NaN;  Qerrors(unknown,:) = NaN;endQerrors = sqrt(Qerrors);%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩av在线免费观看不卡| 国产一区二区导航在线播放| 精品国产乱码久久久久久影片| 懂色av噜噜一区二区三区av| 天堂蜜桃一区二区三区| 最新热久久免费视频| 在线播放视频一区| 色综合久久综合网欧美综合网| 久久爱另类一区二区小说| 亚洲免费观看高清| 亚洲国产成人午夜在线一区| 日韩女优毛片在线| 欧美精品电影在线播放| 99re66热这里只有精品3直播| 国产在线日韩欧美| 日本免费在线视频不卡一不卡二 | 国产精品国产三级国产aⅴ无密码| 欧美精品在欧美一区二区少妇 | 日韩免费电影网站| 欧美中文字幕一区| 91麻豆国产福利精品| 国产精品一二三四区| 蜜臀av在线播放一区二区三区| 亚洲夂夂婷婷色拍ww47| 亚洲视频一二三区| 欧美国产精品v| 国产香蕉久久精品综合网| 欧美精品一区二区三区蜜桃视频 | 91理论电影在线观看| 国产suv精品一区二区883| 激情综合亚洲精品| 久久99久久精品欧美| 裸体一区二区三区| 开心九九激情九九欧美日韩精美视频电影| 日韩一区二区三区视频| 欧美丰满一区二区免费视频 | 国产偷国产偷亚洲高清人白洁| 日韩精品一区二区三区蜜臀 | 国产aⅴ精品一区二区三区色成熟| 日韩精品亚洲专区| 亚洲成人黄色小说| 亚洲国产一区二区三区| 亚洲一二三区视频在线观看| 亚洲国产另类精品专区| 视频在线观看91| 午夜激情一区二区三区| 日本女人一区二区三区| 六月婷婷色综合| 国产精品一线二线三线| 成人一区二区三区在线观看| av不卡在线播放| 欧洲一区在线电影| 欧美日韩久久久久久| 欧美一级高清片在线观看| 日韩一区二区三区精品视频| 精品久久久久久无| 中文字幕制服丝袜成人av| 亚洲六月丁香色婷婷综合久久| 艳妇臀荡乳欲伦亚洲一区| 日韩和欧美的一区| 久久精品99国产精品| 国产不卡免费视频| 91高清在线观看| 欧美欧美欧美欧美首页| 91精品国产综合久久久久久久久久 | 成人理论电影网| 色诱视频网站一区| 欧美一卡二卡在线| 国产欧美一二三区| 亚洲自拍偷拍综合| 精品一区二区三区久久久| 国产一区在线观看麻豆| 91尤物视频在线观看| 3751色影院一区二区三区| 久久亚洲一区二区三区四区| 亚洲欧美偷拍另类a∨色屁股| 亚洲国产综合在线| 国产成人午夜精品影院观看视频| 色噜噜夜夜夜综合网| 精品日韩一区二区| 亚洲婷婷国产精品电影人久久| 首页亚洲欧美制服丝腿| 国产91对白在线观看九色| 欧美日韩在线精品一区二区三区激情| 日韩网站在线看片你懂的| 国产欧美日韩不卡| 亚洲地区一二三色| 成人开心网精品视频| 欧美一区二区性放荡片| 中文字幕一区视频| 免费成人在线观看| 99re这里只有精品视频首页| 日韩亚洲欧美综合| 一区二区高清视频在线观看| 国内精品伊人久久久久av一坑| 色综合天天性综合| 久久久一区二区三区| 五月婷婷激情综合| 91污在线观看| 国产亚洲午夜高清国产拍精品| 亚洲一线二线三线视频| 大桥未久av一区二区三区中文| 欧美一区二区三区白人| 亚洲制服欧美中文字幕中文字幕| 大尺度一区二区| 精品国一区二区三区| 亚洲午夜影视影院在线观看| 懂色av一区二区三区免费观看| 精品日本一线二线三线不卡| 亚洲国产精品视频| 色婷婷综合久色| 国产精品超碰97尤物18| 国产在线播放一区二区三区| 欧美一级片在线看| 亚洲成人自拍偷拍| 欧美性大战久久久| 亚洲欧美日韩小说| 成人涩涩免费视频| 欧美国产精品一区二区三区| 久久99精品一区二区三区 | 欧美图片一区二区三区| 亚洲视频免费看| 风间由美性色一区二区三区| 精品国产欧美一区二区| 蜜臀av国产精品久久久久| 在线电影一区二区三区| 亚洲国产欧美日韩另类综合| 91官网在线观看| 一区二区欧美视频| 欧美日韩专区在线| 五月婷婷综合激情| 日韩一区二区三区观看| 美女免费视频一区二区| 日韩丝袜美女视频| 狂野欧美性猛交blacked| 日韩亚洲欧美在线| 精品中文字幕一区二区小辣椒| 日韩亚洲欧美综合| 精品制服美女丁香| 欧美精品一区二区三区四区 | 日本美女视频一区二区| 51精品秘密在线观看| 三级欧美韩日大片在线看| 欧美日韩一区久久| 日韩avvvv在线播放| 精品国产伦理网| 成人一道本在线| 亚洲丝袜精品丝袜在线| 91国偷自产一区二区开放时间| 一区二区三区免费在线观看| 欧美图区在线视频| 久久国产精品色婷婷| 国产视频亚洲色图| 99麻豆久久久国产精品免费| 成人精品免费看| 国产精品狼人久久影院观看方式| 97成人超碰视| 日韩电影在线观看电影| 久久久午夜电影| av影院午夜一区| 午夜精品福利一区二区三区av| 精品国产一区二区国模嫣然| 成人在线综合网站| 亚洲亚洲精品在线观看| 精品国产乱码久久久久久老虎| 国产成人午夜片在线观看高清观看| 国产精品国产a| 欧美精品123区| 懂色av一区二区三区蜜臀| 亚洲国产精品自拍| 欧美mv和日韩mv的网站| 99视频在线精品| 秋霞成人午夜伦在线观看| 国产午夜亚洲精品不卡| 欧美色爱综合网| 国产中文字幕精品| 亚洲激情校园春色| 欧美成人一区二区三区片免费 | 亚洲风情在线资源站| 久久亚洲免费视频| 91黄色免费观看| 国产综合成人久久大片91| 亚洲人亚洲人成电影网站色| 欧美一区二区精品在线| 不卡的av中国片| 捆绑调教一区二区三区| 亚洲品质自拍视频| 精品欧美一区二区久久| 在线精品国精品国产尤物884a| 极品尤物av久久免费看| 亚洲免费在线电影| 欧美精品一区二区三区四区 | 中文字幕一区二区三| 欧美日韩国产bt| 不卡一区二区在线| 久久精品国产色蜜蜜麻豆| 亚洲激情自拍视频| 国产精品免费久久| 欧美电影免费观看高清完整版在线 | 欧美日韩国产首页在线观看|