From 150fcc2b152c8bffb59cc08526da46eef6ac35da Mon Sep 17 00:00:00 2001 From: luav Date: Mon, 4 Sep 2017 19:14:30 +0200 Subject: [PATCH] Desctiption updated, tracing added in Debug --- README.md | 3 +-- onmi.cpp | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c1b2bfc..fe019ae 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,7 @@ by Andrea Lancichinetti, Santo Fortunato and János Kertész* Author: Aaron F. McDaid 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 ## Content diff --git a/onmi.cpp b/onmi.cpp index d0a5c8f..f794c70 100644 --- a/onmi.cpp +++ b/onmi.cpp @@ -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(omFlipped, g1, g2), VI_oneSide(om, g2, g1)); #endif // DEBUG //return 0.5*( H_Xs+H_Ys - VI_oneSide(omFlipped, g1, g2) //- VI_oneSide(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(omFlipped, g1, g2), H_Ys - VI_oneSide(om, g2, g1)) / Combiner()(H_Xs, H_Ys); }