Skip to content

Commit 282a49b

Browse files
committed
updated parameters in unit tests to new shorter names
1 parent 0209300 commit 282a49b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pgamit/tests/test_make_clusters.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
@pytest.mark.parametrize(
12-
("max_clust_size", "clust_size"),
12+
("max_size", "clust_size"),
1313
[
1414
[5, 10],
1515
[7, 10],
@@ -20,20 +20,20 @@
2020
[30, 250],
2121
],
2222
)
23-
def test_ceiling_variable_density(max_clust_size, clust_size):
23+
def test_ceiling_variable_density(max_size, clust_size):
2424
"""Test algorithmic guarantee of BisectingQMeans on variable density data
2525
26-
Verify that when `min_clust_size=2`, that the max per cluster membership is
26+
Verify that when `min_size=2`, that the max per cluster membership is
2727
under (<, less than) what parameter `opt_cluster_size` is set to"""
2828

2929
data = gen_variable_density_clusters(clust_size)
30-
clust = BisectingQMeans(min_clust_size=1, opt_clust_size=max_clust_size,
30+
clust = BisectingQMeans(min_size=1, opt_size=max_size,
3131
init='random', n_init=50, algorithm='lloyd',
3232
max_iter=8000, random_state=42)
3333
clust.fit(data)
3434

3535
_, counts = np.unique(clust.labels_, return_counts=True)
36-
assert np.max(counts) < max_clust_size
36+
assert np.max(counts) < max_size
3737

3838
@pytest.mark.parametrize(
3939
("min_clust", "max_clust", "neighbors", "overlap"),
@@ -53,7 +53,7 @@ def test_max_clust_expansion(min_clust, max_clust, neighbors, overlap):
5353
[initial cluster size + (neighbors * overlap)]"""
5454

5555
data = gen_variable_density_clusters()
56-
clust = BisectingQMeans(min_clust_size=min_clust, opt_clust_size=max_clust,
56+
clust = BisectingQMeans(min_size=min_clust, opt_size=max_clust,
5757
init='random', n_init=50, algorithm='lloyd',
5858
max_iter=8000, random_state=42)
5959
clust.fit(data)

0 commit comments

Comments
 (0)