@@ -109,7 +109,7 @@ def test_non_consicutive_labels():
109109
110110def uniform_labelings_scores (score_func , n_samples , k_range , n_runs = 10 ,
111111 seed = 42 ):
112- """ Compute score for random uniform cluster labelings"""
112+ # Compute score for random uniform cluster labelings
113113 random_labels = np .random .RandomState (seed ).random_integers
114114 scores = np .zeros ((len (k_range ), n_runs ))
115115 for i , k in enumerate (k_range ):
@@ -121,7 +121,7 @@ def uniform_labelings_scores(score_func, n_samples, k_range, n_runs=10,
121121
122122
123123def test_adjustment_for_chance ():
124- """ Check that adjusted scores are almost zero on random labels"""
124+ # Check that adjusted scores are almost zero on random labels
125125 n_clusters_range = [2 , 10 , 50 , 90 ]
126126 n_samples = 100
127127 n_runs = 10
@@ -134,7 +134,7 @@ def test_adjustment_for_chance():
134134
135135
136136def test_adjusted_mutual_info_score ():
137- """ Compute the Adjusted Mutual Information and test against known values"""
137+ # Compute the Adjusted Mutual Information and test against known values
138138 labels_a = np .array ([1 , 1 , 1 , 1 , 1 , 1 , 2 , 2 , 2 , 2 , 2 , 2 , 3 , 3 , 3 , 3 , 3 ])
139139 labels_b = np .array ([1 , 1 , 1 , 1 , 2 , 1 , 2 , 2 , 2 , 2 , 3 , 1 , 3 , 3 , 3 , 2 , 2 ])
140140 # Mutual information
@@ -177,7 +177,7 @@ def test_contingency_matrix():
177177
178178
179179def test_exactly_zero_info_score ():
180- """ Check numerical stability when information is exactly zero"""
180+ # Check numerical stability when information is exactly zero
181181 for i in np .logspace (1 , 4 , 4 ).astype (np .int ):
182182 labels_a , labels_b = np .ones (i , dtype = np .int ),\
183183 np .arange (i , dtype = np .int )
@@ -188,7 +188,7 @@ def test_exactly_zero_info_score():
188188
189189
190190def test_v_measure_and_mutual_information (seed = 36 ):
191- """ Check relation between v_measure, entropy and mutual information"""
191+ # Check relation between v_measure, entropy and mutual information
192192 for i in np .logspace (1 , 4 , 4 ).astype (np .int ):
193193 random_state = np .random .RandomState (seed )
194194 labels_a , labels_b = random_state .random_integers (0 , 10 , i ),\
0 commit comments