Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 21b0bb4

Browse files
jnothmanlesteve
authored andcommitted
TST More informative error message in test_preserve_trustworthiness_approximately (#9738)
1 parent e88baea commit 21b0bb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sklearn/manifold/tests/test_t_sne.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,9 @@ def test_preserve_trustworthiness_approximately():
244244
method=method)
245245
X_embedded = tsne.fit_transform(X)
246246
t = trustworthiness(X, X_embedded, n_neighbors=1)
247-
assert_greater(t, 0.9)
247+
assert_greater(t, 0.9, msg='Trustworthiness={:0.3f} < 0.9 '
248+
'for method={} and '
249+
'init={}'.format(t, method, init))
248250

249251

250252
def test_optimization_minimizes_kl_divergence():

0 commit comments

Comments
 (0)