From 77e7a942c541e1e8c3e0c7f7b7239637edeb832e Mon Sep 17 00:00:00 2001 From: FBruzzesi Date: Thu, 28 Dec 2023 16:50:02 +0100 Subject: [PATCH] umap lower n_neighbors --- tests/test_estimators/test_umap_reconstruction.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/test_estimators/test_umap_reconstruction.py b/tests/test_estimators/test_umap_reconstruction.py index 1d7acab53..9e7c220c0 100644 --- a/tests/test_estimators/test_umap_reconstruction.py +++ b/tests/test_estimators/test_umap_reconstruction.py @@ -27,7 +27,7 @@ ), ) def test_estimator_checks(test_fn): - outlier_mod = UMAPOutlierDetection(n_components=2, threshold=0.1) + outlier_mod = UMAPOutlierDetection(n_components=2, threshold=0.1, n_neighbors=3) test_fn(UMAPOutlierDetection.__name__, outlier_mod) @@ -38,6 +38,12 @@ def dataset(): def test_obvious_usecase(dataset): - mod = UMAPOutlierDetection(n_components=2, threshold=7.5, random_state=42, variant="absolute").fit(dataset) + mod = UMAPOutlierDetection( + n_components=2, + threshold=7.5, + random_state=42, + variant="absolute", + n_neighbors=3, + ).fit(dataset) assert mod.predict([[10] * 10]) == np.array([-1]) assert mod.predict([[0.01] * 10]) == np.array([1])