source: distools/getsig.m @ 35

Last change on this file since 35 was 10, checked in by bduin, 14 years ago
File size: 957 bytes
Line 
1%GETSIG Retrieve the signature from a pseudo-Euclidean dataset or mapping
2%
3%   SIG = GETSIG(W)
4%   SIG = GETSIG(A)
5%
6% INPUT
7%   W    PE mapping, W = PE_EM(D), if D is a dissimilarity matrix
8%   A    Dataset, vectors in PE space, A = D*W
9%
10% OUTPUT
11%   SIG  Signature, 2-element vector with numbers of
12%        positive and negative dimensions
13%
14% SEE ALSO
15% DATASETS, MAPPINGS, SETSIG, PE_EM, PE_DISTM
16
17% Copyright: R.P.W. Duin, r.p.w.duin@prtools.org
18% Faculty EWI, Delft University of Technology
19% P.O. Box 5031, 2600 GA Delft, The Netherlands
20
21function sig = getsig(a)
22
23  if isdataset(a)
24    sig = getuser(a,'pe_signature');
25    if isempty(sig)
26      sig = [size(a,2) 0];
27    end
28  elseif ismapping(a)
29    if ispsem(a)
30      a = pe_em(a);
31    end
32    if ispe_em(a)
33      sig = getdata(a,'sig');
34    else
35      sig = [size(a,2) 0];
36    end
37  else % doubles
38    sig = [size(a,2) 0];
39  end
40   
41return
42 
43 
44 
Note: See TracBrowser for help on using the repository browser.