source:
distools/asymmetry.m
@
41
Last change on this file since 41 was 10, checked in by bduin, 14 years ago | |
---|---|
File size: 327 bytes |
Line | |
---|---|
1 | %ASYMMETRY Estimate asymmetry of dissimilarity matrix |
2 | % |
3 | % ASYM = ASYMMETRY(D) |
4 | % |
5 | % The asymmetry is defined as the average over 2*|D-D'|./(|D|+|D'|). |
6 | |
7 | function asym = asymmetry(d) |
8 | |
9 | d = +d; |
10 | e = abs(d-d')./(abs(d)+abs(d')+1e-100); %avoid division by 0 |
11 | L = find(~isnan(e)); |
12 | asym = mean(mean(e(L))); |
13 | |
14 | return |
Note: See TracBrowser
for help on using the repository browser.