classc.m

来自「模式识别工具箱,本人毕业论文时用到的,希望对大家有用!」· M 代码 · 共 37 行

M
37
字号
%CLASSC Convert mapping to classifier%%	W = classc(W)%	W = W*classc%% The mapping W is converted into a classifier: outputs (distances to the map)% are converted by the sigmoid function to probabilities and normalized (sum% equals one). A one-dimensional map is converted into a two-class classifier,% provided that during the construction a class label was supplied. If not,% the map cannot be converted and an error is generated.%%	D = D*classc%% If D = A*W, the result of a mapping, it is converted to probabilities and% normalized (sum to one). This is similar to D = D*sigm*normm. D should have% at least two columns (classes).% Copyright: R.P.W. Duin, duin@ph.tn.tudelft.nl% Faculty of Applied Physics, Delft University of Technology% P.O. Box 5046, 2600 GA Delft, The Netherlandsfunction w = classc(w)if nargin == 0	w = mapping('classc','combiner');	returnendif isa(w,'mapping')	w = setclass(w,1);	if size(getlab(w),1) < 2 & istrained(w)		error('Mapping has not enough labels for converting to classifier')	endelseif isa(w,'dataset')		w = w*sigm*normm;else	error('Input should be mapping or dataset')end

⌨️ 快捷键说明

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