Skip to content

Commit

Permalink
Desctiption updated, tracing added in Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
luav committed Sep 4, 2017
1 parent 96d1ab3 commit 150fcc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ by Andrea Lancichinetti, Santo Fortunato and János Kertész*
Author: Aaron F. McDaid <aaronmcdaid@gmail.com>

This is a fork of the original [onmi](https://github.com/aaronmcdaid/Overlapping-NMI)
with the extension purposes (mainly modification of the I/O, node base synchronization, etc.)
to be used in the [PyCaBeM](https://github.com/eXascaleInfolab/PyCABeM) clustering benchmark.
with the extension purposes to be used in the [PyCaBeM](https://github.com/eXascaleInfolab/PyCABeM) clustering benchmark. The extendsion and bugfixes include: modification of the I/O, node base synchronization, NMI_sqrt added, normalization border cases fixed (the case of fully overlapping multiple clusters), etc.
Changes made by Artem Lutov <artem@exascale.info>

## Content
Expand Down
5 changes: 3 additions & 2 deletions onmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,14 @@ double aaronNMI(const OverlapMatrix &om, const OverlapMatrix &omFlipped
H_Ys += H(x, om.N)+H(om.N-x, om.N);
}
#ifdef DEBUG
printf("aaronNMI(), H_Xs: %G (g2 size: %lu), H_Ys: %G (g1 size: %lu)\n"
, H_Xs, g2.size(), H_Ys, g1.size());
printf("aaronNMI(), H_Xs: %G (g2 size: %lu), H_Ys: %G (g1 size: %lu), VI1: %G, VI2: %G\n"
, H_Xs, g2.size(), H_Ys, g1.size(), VI_oneSide<false>(omFlipped, g1, g2), VI_oneSide<false>(om, g2, g1));
#endif // DEBUG
//return 0.5*( H_Xs+H_Ys - VI_oneSide<false>(omFlipped, g1, g2)
//- VI_oneSide<false>(om, g2, g1) ) / Combiner()(H_Xs, H_Ys);
// Note: initial formula does not work for the sqrt and nax combiners for the fully overlapping clusters:
// the ground-truth can be types / multiple categories for the same items (cluster: 1 2; gt: 1 2; 1 2)
// Internal Note: the counter example for this measure is rotshift_single.cnl
return Combiner()(H_Xs - VI_oneSide<false>(omFlipped, g1, g2),
H_Ys - VI_oneSide<false>(om, g2, g1)) / Combiner()(H_Xs, H_Ys);
}
Expand Down

0 comments on commit 150fcc2

Please sign in to comment.