📄 reducm.m
字号:
%REDUCM Reduce to minimal space%% W = reducm(A)%% Ortho-normal mapping to a space in which the dataset A exactly fits.% This is useful for datasets with more features than objects.% For the objects in B = A*W holds that their dimensionality is% minimum, their mean is zero, the covariance matrix is diagonal with % decreasing variances and the interobject distances are equal to% those of A.%% See also datasets, mappings, nlfisherm, klm% 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 = reducm(a)if nargin < 1 | isempty(a) W = mapping('reducm'); returnendif isa(a,'dataset') imheight = getimheight(a); a = +a;else imheight = 0;end[m,k] = size(a);[R,s,v] = svd(a',0);a = a*R;r = rank(a);if r == m, r = r-1; enda = a/max(abs(a(:))); % occasionally necessary to prevent inf's in covG = cov(a);[F V] = eig(G); [v,I] = sort(-diag(V)); I = I(1:r);R = R*F(:,I);W = mapping('affine',[R;-mean(a*F(:,I))],[],k,r,1,imheight);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -