⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 plotfeaturevsindex.m

📁 一个关于数据聚类和模式识别的程序,在生物化学,化学中因该都可以用到.希望对大家有用,谢谢支持
💻 M
字号:
function out = plotFeatureVsIndex(DS)
%plotFeatureVsIndex: Plot of feature vs. data index

%	Roger Jang, 20041209

if nargin == 0, selfdemo; return, end

[featureNum, dataNum]=size(DS.input);
distinctClass = elementCount(DS.output);
classNum = length(distinctClass);
plotNum = featureNum;
side = ceil(sqrt(plotNum));
k = 1;
for i = 1:side,
	for j = 1:side,
		if k <= plotNum,
			subplot(side, side, k);
			for p=1:classNum
				index=find(DS.output==distinctClass(p));
				line(index, DS.input(k,index), 'marker', '.', 'lineStyle', 'none', 'color', getColor(p));
			end
			box on; axis([-inf inf -inf inf]);
			xlabel('Data index');
			if isfield(DS, 'inputName')
				ylabel(['x', num2str(k), ': ', DS.inputName{k}]);
			else
				ylabel(['x', num2str(k)]);
			end

			k = k+1;
		end
	end
end

% ====== Self demo
function selfdemo
DS=prData('iris');
feval(mfilename, DS);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -