udc.m

来自「matlab 模式识别工具包 希望能对你们有用」· M 代码 · 共 32 行

M
32
字号
%UDC Uncorrelated normal based quadratic Bayes classifier% % 	W = udc(A)% % Computation a quadratic classifier between the classes in the % dataset A assuming normal densities with uncorrelated features.%% The classification A*W is computed by normal_map. See there for details.% % See also mappings, datasets, nmc, nmsc, ldc, qdc, normal_map% 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 = udc(a)if nargin == 0	W = mapping('udc');	returnend[nlab,lablist,m,k,c,p] = dataset(a);if min(sum(expandd(nlab,c),1)) < 2        error('Classes should contain more than one vector')end[U,G] = meancov(a);for j = 1:c	G(:,:,j) = diag(diag(G(:,:,j)));endW = mapping('normal_map',{U,G,p},getlab(U),k,c,1,[]);return

⌨️ 快捷键说明

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