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

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

?? som_modify_dataset.m

?? SOM算法,matlab程序,是經典的教科書的例子程序
?? M
字號:
function sD = som_modify_dataset(sD,action,varargin)%SOM_MODIFY_DATASET Add or remove components or samples to/from a data struct.%% sD = som_modify_dataset(sD, 'addcomp', D, [indsto], [cnames})% sD = som_modify_dataset(sD, 'addsamp', D, [indsto], ['norm'])% sD = som_modify_dataset(sD, 'removecomp', [inds])% sD = som_modify_dataset(sD, 'removesamp', inds)% sD = som_modify_dataset(sD, 'extractcomp', [inds])% sD = som_modify_dataset(sD, 'extractsamp', inds)% sD = som_modify_dataset(sD, 'movecomp', inds, indsto)% sD = som_modify_dataset(sD, 'movesamp', inds, indsto)%%  Input and output arguments ([]'s are optional)%   sD      (struct) data struct%   action  (string) 'addcomp', 'addsamp', 'removecomp', 'removesamp', %                    'extractcomp', 'extractsamp', 'movecomp', or 'movesamp' %%   other input arguments depend on the action%%   'addcomp': %   D        (matrix) data matrix, size [dlen x d]%            (struct) data struct, size of .data field [dlen x d]%   [indsto] (vector) new indeces of the components, length=d%   [cnames] (cellstr) of size d x 1, the component names%%   'addsamp': %   D        (matrix) data matrix, size [n x dim] %   [indsto] (vector) new indeces of the samples, length=n%   ['norm'] (string) specified if the normalization procedure%                     should be applied to the new samples%%   'removecomp', 'extractcomp': %   [inds]   (vector) indeces of the components to be removed/extracted. %                     If not given, a prompt will appear from which the%                     user can select the appropriate components.%%   'removesamp', 'extractsamp': %   inds     (vector) indeces of the samples to be removed/extracted%%   'movecomp', 'movesamp': %   inds     (vector) indeces of the components/samples to be moved%   indsto   (vector) new indeces of the components/samples %% See also SOM_DATA_STRUCT.% 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 200400 160600 280800%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% input arguments[dlen dim] = size(sD.data);switch action,   case 'addcomp',      D = varargin{1};         if isstruct(D), [n d] = size(D.data); else [n d] = size(D); end    if n ~= dlen, error('The number of samples in the data struct and new data should match.'); end    indsto = [];     cnames = [];     for i=2:length(varargin),       if isnumeric(varargin{i}), 	indsto = varargin{i}; 	if length(indsto) ~= d, 	  error('The number of indeces should match the number of new components'); 	end      else	if ischar(varargin{i}), cnames = cellstr(varargin{i}); 	elseif iscellstr(varargin{i}), cnames = varargin{i}; 	else	  error(['[som_modify_dataset] Unrecognized argument #' num2str(i+1)]); 	end		if length(cnames) ~= d, 	  error('The number of component names should match the number of new components'); 	end      end    end case 'addsamp',  D = varargin{1};  if isstruct(D),     lab = D.labels;     if isfield(D,'data'), D = D.data; else D = D.codebook; end  else lab = [];   end  [n d] = size(D);   if d ~= dim,     error(['The dimensions of the old and new data sets should match.']);   end  norm = 0;   indsto = [];   for i=2:length(varargin),    if ischar(varargin{i}) & strcmp(varargin{i},'norm'), norm = 1;     elseif isnumeric(varargin{i}),       indsto = varargin{i};       if length(indsto) ~= n, 	error(['The number of new indeces should match the number of new' ...	       ' samples']);       end    else      warning(['[som_modify_dataset] Ignoring unrecognized argument #', ...	       num2str(i+2)]);    end  end case 'removecomp',  if length(varargin)>0,     inds = varargin{1};  else    [inds, ok] = listdlg('ListString',sD.comp_names, 'PromptString', ...                         'Components', 'Name', 'Remove components', 'uh', 25);    if ~ok, return; end  end  if min(inds)<1 | max(inds)>dim,     error('The component indeces must be within [1,dim]');   end case 'removesamp',  inds = varargin{1};  if min(inds)<1 | max(inds)>dlen,     error('The sample indeces must be within [1,dlen]');   end case 'extractcomp',  if length(varargin)>0,     inds = varargin{1};  else    [inds, ok] = listdlg('ListString',sD.comp_names, 'PromptString',...                          'Components', 'Name', 'Extract components', 'uh', 25);    if ~ok, return; end  end  if min(inds)<1 | max(inds)>dim,     error('The component indeces must be within [1,dim]');   end case 'extractsamp',  inds = varargin{1};  if min(inds)<1 | max(inds)>dlen,     error('The sample indeces must be within [1,dlen]');   end case 'movecomp',  inds = varargin{1};  indsto = varargin{2};  if min(inds)<1 | max(inds)>dim | min(indsto)<1 | max(indsto)>dim,     error('The component indeces must be within [1,dim]');   end case 'movesamp',  inds = varargin{1};  indsto = varargin{2};  if min(inds)<1 | max(inds)>dlen | min(indsto)<1 | max(indsto)>dlen,     error('The sample indeces must be within [1,dlen]');   end otherwise,   error('Unrecognized action mode');end   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% actionswitch action,   case 'addcomp',     if isstruct(D),             sD.data = [sD.data, D.data];       sD.comp_names(dim+[1:d]) = D.comp_names;       sD.comp_norm(dim+[1:d]) = D.comp_norm;       sD = som_label(sD,'add',1:dlen,D.labels);    else      sD.data = [sD.data, D];      if isempty(cnames), 	for i=1:d, sD.comp_names(dim+i) = {sprintf('Variable%d',i+dim)}; end      else	sD.comp_names(dim+[1:d]) = cnames;       end      for i=1:d, sD.comp_norm(dim+i) = {[]}; end    end    if ~isempty(indsto),       sD = som_modify_dataset(sD,'movecomp',dim+[1:d],indsto);    end  case 'addsamp',     if norm, D = som_normalize(D,sD); end    sD.data = [sD.data; D];     nl = size(sD.labels,2);     sD.labels(dlen+[1:n],1:nl) = {''};    if ~isempty(lab),       nl2 = size(lab,2);       if nl2>nl, sD.labels(1:dlen,nl+[1:(nl2-nl)]) = {''}; end      sD.labels(dlen+[1:n],1:nl2) = lab;     end    if ~isempty(indsto),       sD = som_modify_dataset(sD,'movesamp',dlen+[1:n],indsto);    end  case 'removecomp',     includeinds = 1:dim;     includeinds(inds) = 0;     sD = som_modify_dataset(sD,'extractcomp',find(includeinds));  case 'removesamp',     includeinds = 1:dlen;     includeinds(inds) = 0;     sD = som_modify_dataset(sD,'extractsamp',find(includeinds));  case 'extractcomp',     sD.data = sD.data(:,inds);    sD.comp_names = sD.comp_names(inds);    sD.comp_norm = sD.comp_norm(inds);      case 'extractsamp',     sD.data = sD.data(inds,:);    sD.labels = sD.labels(inds,:);  case 'movecomp',     [indsto,order] = sort(indsto);    inds = inds(order);    oldinds = 1:dim;     oldinds(inds) = 0;     newinds = oldinds(oldinds>0);    for i=1:length(indsto),      ifrom = inds(i); ito = indsto(i);      if ito==1, newinds = [ifrom, newinds];      else newinds = [newinds(1:ito-1), ifrom, newinds(ito:end)];      end    end    sD.data = sD.data(:,newinds);     sD.comp_names = sD.comp_names(:,newinds);     sD.comp_norm = sD.comp_norm(:,newinds);   case 'movesamp',     [indsto,order] = sort(indsto);    inds = inds(order);    oldinds = 1:dim;     oldinds(inds) = 0;     newinds = oldinds(oldinds>0);    for i=1:length(indsto),      ifrom = inds(i); ito = indsto(i);      if ito==1, newinds = [ifrom, newinds];      else newinds = [newinds(1:ito-1), ifrom, newinds(ito:end)];      end    end    sD.data = sD.data(newinds,:);    sD.labels = sD.labels(newinds,:);end%som_set(sD);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91日韩一区二区三区| 久久久精品日韩欧美| 精品免费日韩av| 亚洲视频一二三区| 日韩制服丝袜先锋影音| 成人在线综合网| 欧美成人伊人久久综合网| 亚洲免费伊人电影| 国产麻豆精品在线观看| 欧美肥大bbwbbw高潮| 中文字幕一区免费在线观看| 蜜桃精品视频在线| 欧美日韩一区精品| 国产精品国产三级国产| 极品少妇一区二区| 91精品午夜视频| 亚洲精品日产精品乱码不卡| 国产精品自在欧美一区| 欧美高清激情brazzers| 亚洲精品免费播放| 91在线精品一区二区三区| 久久久久国产精品厨房| 裸体在线国模精品偷拍| 欧美电影在线免费观看| 伊人夜夜躁av伊人久久| 99精品国产视频| 亚洲国产精品传媒在线观看| 国产美女主播视频一区| 精品国产伦一区二区三区观看体验| 亚洲综合另类小说| 欧美中文字幕一二三区视频| 国产精品久久久久永久免费观看| 国产乱码精品一区二区三| 欧美videossexotv100| 蜜臀av一区二区三区| 91精品国产色综合久久久蜜香臀| 亚洲一区在线观看视频| 欧美视频一区二区在线观看| 亚洲自拍偷拍九九九| 欧美色精品在线视频| 婷婷国产在线综合| 91精品国产综合久久婷婷香蕉| 性做久久久久久免费观看 | 精品中文字幕一区二区小辣椒| 欧美久久久久久蜜桃| 日韩高清不卡一区二区三区| 欧美高清一级片在线| 玖玖九九国产精品| 精品国产成人在线影院| 国产麻豆成人精品| 成人欧美一区二区三区白人 | 国产欧美一区二区三区沐欲| 国产成人精品亚洲777人妖 | 久久久久久久久久久久久夜| 国产精品一区免费在线观看| 国产精品初高中害羞小美女文| 91亚洲国产成人精品一区二区三| 亚洲精品乱码久久久久久久久| 91丝袜美腿高跟国产极品老师 | 17c精品麻豆一区二区免费| 色综合天天综合狠狠| 午夜精品久久久久久| 精品嫩草影院久久| 99精品视频中文字幕| 午夜久久久久久久久| 日韩欧美一区二区久久婷婷| 国产成人精品免费| 亚洲黄色av一区| 精品欧美乱码久久久久久1区2区| 成人国产精品免费观看| 亚洲一卡二卡三卡四卡| 欧美成人官网二区| 91久久精品一区二区| 美女性感视频久久| 亚洲精品视频免费看| 337p粉嫩大胆色噜噜噜噜亚洲| 99久久99久久综合| 九色porny丨国产精品| 《视频一区视频二区| 日韩一二在线观看| 色婷婷激情久久| 国内精品不卡在线| 首页国产欧美久久| 亚洲欧洲日韩在线| 欧美成人福利视频| 欧美日韩精品欧美日韩精品| 国产大陆a不卡| 日本美女一区二区| 亚洲国产一区二区三区| 国产区在线观看成人精品| 欧美精品乱人伦久久久久久| aaa国产一区| 国产高清久久久久| 美女国产一区二区三区| 亚洲国产日日夜夜| 国产精品久久久久影院| 精品福利二区三区| 欧美一区二区三级| 欧美午夜一区二区三区| 一本久久精品一区二区| 国产成人午夜精品5599| 韩国女主播一区二区三区| 亚洲一区影音先锋| 亚洲另类一区二区| 亚洲欧美自拍偷拍| 亚洲国产成人午夜在线一区| 精品国产乱码久久| 精品欧美久久久| 欧美一区二区三区视频| 欧美天天综合网| 日本精品一区二区三区高清 | 免费在线看成人av| 亚洲国产欧美在线| 亚洲一区二区三区四区不卡| 亚洲人成亚洲人成在线观看图片| 成人欧美一区二区三区白人| 国产欧美一区二区精品性色| 久久精品视频一区二区三区| 久久久久久免费| 久久久一区二区三区| 精品国产电影一区二区| 久久久久久久久蜜桃| 欧美国产精品一区二区| 国产女主播在线一区二区| 国产亚洲一区二区在线观看| 26uuu色噜噜精品一区二区| 26uuu精品一区二区| 久久先锋影音av| 国产嫩草影院久久久久| 综合久久久久综合| 亚洲精品国产第一综合99久久| 亚洲欧美精品午睡沙发| 亚洲综合精品久久| 午夜精品一区二区三区三上悠亚 | 亚洲乱码日产精品bd| 一区二区三区免费在线观看| 午夜欧美电影在线观看| 麻豆极品一区二区三区| 国产精品888| 色综合婷婷久久| 制服.丝袜.亚洲.另类.中文| 日韩欧美国产一二三区| 欧美高清在线视频| 一区二区三区波多野结衣在线观看 | 精品欧美一区二区久久| 欧美高清在线视频| 一区二区三区精品视频在线| 亚洲v中文字幕| 国产一区二区h| 一本色道久久综合亚洲aⅴ蜜桃 | 欧美日韩综合在线| 日韩亚洲欧美在线观看| 欧美极品美女视频| 亚洲综合视频在线| 99v久久综合狠狠综合久久| 色综合久久天天综合网| 欧美tickling网站挠脚心| 国产精品美女久久久久久| 亚洲国产成人精品视频| 国产麻豆视频一区二区| 欧美性做爰猛烈叫床潮| 精品国产乱码久久久久久夜甘婷婷 | 亚洲图片自拍偷拍| 国产成人丝袜美腿| 欧美吞精做爰啪啪高潮| 国产亚洲欧美激情| 婷婷综合另类小说色区| 成人黄动漫网站免费app| 欧美一区二区视频网站| 国产精品黄色在线观看| 免费高清成人在线| 91国产成人在线| 久久精品水蜜桃av综合天堂| 午夜成人免费电影| 91同城在线观看| 久久精品人人做人人综合| 日韩av在线播放中文字幕| 成人av综合在线| 精品国产乱码久久久久久老虎 | 亚洲欧洲国产日本综合| 国产在线不卡视频| 日韩一区二区免费在线观看| 亚洲欧美日韩一区二区三区在线观看| 国产精品一色哟哟哟| 日韩亚洲欧美高清| 五月激情综合婷婷| 色国产综合视频| 亚洲视频小说图片| va亚洲va日韩不卡在线观看| 国产校园另类小说区| 国内外成人在线视频| 精品久久久久久久久久久久久久久久久| 一区二区三区毛片| 91黄色激情网站| 最新久久zyz资源站| 成人av电影在线网| 国产精品成人免费| av亚洲精华国产精华精| 国产精品久久福利| 99精品视频中文字幕|