source: distools/pe_nmc.m @ 100

Last change on this file since 100 was 79, checked in by bduin, 11 years ago
File size: 824 bytes
Line 
1%PE_NMC Nearest Mean Classifier for PE spaces
2%
3%   W = PE_NMC(A)
4%
5% INPUT
6%   A  PE dataset
7%
8% OUTPUT
9%   W  Nearest mean classifier
10%
11% DESCRIPTION 
12% Computation of the nearest mran classifier for the PE dataset A.
13%
14% Warning: class prior probabilities in A are neglected.
15%
16% SEE ALSO
17% MAPPINGS, DATASETS, NMC
18
19% R.P.W. Duin, r.p.w.duin@prtools.org
20% Faculty EWI, Delft University of Technology
21% P.O. Box 5031, 2600 GA Delft, The Netherlands
22
23function w = pe_nmc(a,w)
24
25  if nargin == 0 | isempty(a)
26    w = prmapping(mfilename,'untrained');
27    w = setname(w,'PE Nearest Mean');
28   
29  else
30   
31    if ~ispe_dataset(a)
32      w = nmc(a);
33    else
34      u = meancov(a);
35      sig = getsig(a);
36      u = setsig(u,sig);
37      w = pe_knnc(u,1);
38    end
39   
40  end
41   
42return
Note: See TracBrowser for help on using the repository browser.