8000 [MRG+1] Make TSNE trustworthiness test more robust (#9808) · scikit-learn/scikit-learn@6c99d79 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c99d79

Browse files
ogriseljnothman
authored andcommitted
[MRG+1] Make TSNE trustworthiness test more robust (#9808)
Platform specific rounding errors can make the t-SNE algorithm converge to varying quality results especially on small datasets as done in this test. We therefore need a lower threshold to account for that variability.
1 parent c554aad commit 6c99d79

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sklearn/manifold/tests/test_t_sne.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +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, msg='Trustworthiness={:0.3f} < 0.9 '
248-
'for method={} and '
249-
'init={}'.format(t, method, init))
247+
assert_greater(t, 0.85, msg='Trustworthiness={:0.3f} < 0.85 '
248+
'for method={} and '
249+
'init={}'.format(t, method, init))
250250

251251

252252
def test_optimization_minimizes_kl_divergence():

0 commit comments

Comments
 (0)
0