Generating disconnection data for cosine is hard.
@@ -102,22 +102,14 @@ def test_multi_component_layout_precomputed():
@pytest.mark.parametrize("num_isolates", [1, 5])
-@pytest.mark.parametrize("metric", ["jaccard", "hellinger", "cosine"])
+@pytest.mark.parametrize("metric", ["jaccard", "hellinger"])
@pytest.mark.parametrize("force_approximation", [True, False])
def test_disconnected_data(num_isolates, metric, force_approximation):
- if metric == "cosine":
- options = [-1, 1]
- else:
options = [False, True]
disconnected_data = np.random.choice(
a=options, size=(10, 30), p=[0.6, 1 - 0.6]
)
# Add some disconnected data for the corner case test
- if metric == "cosine":
- disconnected_data = np.vstack(
- [disconnected_data, -disconnected_data[:num_isolates]]
- )
- else:
disconnected_data = np.vstack(
[disconnected_data, np.zeros((num_isolates, 30), dtype="bool")]
)
