Permalink
Browse files

ENH replaced v_measure_score computation with nmi computation.

  • Loading branch information...
1 parent ac63d30 commit 51c49c97c113d3992ab943e5da0ad70c82ad9b72 @amueller amueller committed May 5, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 sklearn/metrics/cluster/supervised.py
@@ -468,7 +468,7 @@ def v_measure_score(labels_true, labels_pred):
>>> v_measure_score([0, 0, 1, 2], [0, 0, 1, 1]) # doctest: +ELLIPSIS
0.8...
>>> v_measure_score([0, 1, 2, 3], [0, 0, 1, 1]) # doctest: +ELLIPSIS
- 0.66...
+ 0.70...
Labelings that have pure clusters with members coming from the same
classes are homogeneous but un-necessary splits harms completeness
@@ -477,7 +477,7 @@ def v_measure_score(labels_true, labels_pred):
>>> v_measure_score([0, 0, 1, 1], [0, 0, 1, 2]) # doctest: +ELLIPSIS
0.8...
>>> v_measure_score([0, 0, 1, 1], [0, 1, 2, 3]) # doctest: +ELLIPSIS
- 0.66...
+ 0.70...
If classes members are completly splitted across different clusters,
the assignment is totally in-complete, hence the v-measure is null::
@@ -492,7 +492,7 @@ def v_measure_score(labels_true, labels_pred):
0.0
"""
- return homogeneity_completeness_v_measure(labels_true, labels_pred)[2]
+ return normalized_mutual_info_score(labels_true, labels_pred)
def mutual_info_score(labels_true, labels_pred, contingency=None):

0 comments on commit 51c49c9

Please sign in to comment.