?? fisherm.m
字號:
%FISHERM Optimal discrimination mapping (Fisher mapping)%% W = fisherm(A,n)%% Finds a mapping of the labeled dataset A to a n-dimensional% linear subspace such that it maximizes the the between scatter% over the within scatter (also called Fisher mapping).%% 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 = fisherm(a,n)if nargin == 1, n = []; endif nargin == 0 | isempty(a) W = mapping('fisherm',n); returnend[nlab,lablist,m,k,c,p,featlist,imheight] = dataset(a);a = a*scalem(a); % set mean to originif isempty(n), n = min(k,c)-1; endif n >= m | n >= c error('Dataset too small or or has too few classes for demanded output dimensionality')endw = klms(a);a = a*w;v = pca(meancov(a),n);if n == 0 W = v;else W = w*v; W = set(W,'p',imheight);endreturn
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -