Skip to content

Commit f2a8edd

Browse files
Shorten the regular HDBSCAN config and move the sweeps out of common
Review feedback: the regular scope was too heavy and the sweep parameter sets only ever served the experiment configs. * configs/regular/hdbscan.json: 36 -> 8 cases. One tree method (kd_tree) on two datasets and brute force on two, which is enough to track performance changes. * configs/weekly/hdbscan.json: new, 30 cases. Takes over the high-load part of what regular used to run: road_network/covtype/cifar/sensit and the n_features blob sweeps over both tree methods. * configs/common/hdbscan.json: keeps only the sets shared across scopes (implementations, common/sklearn parameters, method selection). The metric, cluster-selection, density, store_centers, dtype and data format sweeps moved into configs/experiments/hdbscan_parameters.json, their only consumer. * configs/experiments/README.md: describe the two HDBSCAN experiments. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent d812ff9 commit f2a8edd

5 files changed

Lines changed: 116 additions & 64 deletions

File tree

‎configs/common/hdbscan.json‎

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -49,46 +49,6 @@
4949
"leaf_size": 40
5050
}
5151
}
52-
},
53-
"hdbscan tree metrics": {
54-
"algorithm": {
55-
"estimator_params": { "metric": ["euclidean", "manhattan", "chebyshev"] }
56-
}
57-
},
58-
"hdbscan minkowski metric": {
59-
"algorithm": {
60-
"estimator_params": { "metric": "minkowski", "metric_params": { "p": 3 } }
61-
}
62-
},
63-
"hdbscan cosine metric": {
64-
"algorithm": {
65-
"estimator_params": { "metric": "cosine", "algorithm": "brute" }
66-
}
67-
},
68-
"hdbscan cluster selection sweep": {
69-
"algorithm": {
70-
"estimator_params": { "cluster_selection_method": ["eom", "leaf"] }
71-
}
72-
},
73-
"hdbscan density sweep": {
74-
"algorithm": {
75-
"estimator_params": { "min_cluster_size": [5, 25, 100], "min_samples": [5, 25] }
76-
}
77-
},
78-
"hdbscan store centers sweep": {
79-
"algorithm": {
80-
"estimator_params": { "store_centers": [null, "centroid", "medoid", "both"] }
81-
}
82-
},
83-
"hdbscan dtype sweep": {
84-
"data": { "dtype": ["float32", "float64"] }
85-
},
86-
"hdbscan data format sweep": {
87-
"data": [
88-
{ "format": "numpy", "order": "C" },
89-
{ "format": "numpy", "order": "F" },
90-
{ "format": "pandas", "order": "F" }
91-
]
9252
}
9353
}
9454
}

‎configs/experiments/README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,8 @@
22

33
`daal4py_svd`: tests performance scalability of `daal4py.svd` algorithm
44

5+
`hdbscan_parameters`: sweeps the `HDBSCAN` parameter space (metrics, cluster selection, density thresholds, stored centers, dtypes and data formats) over the `sklearn` and `sklearnex` implementations.
6+
7+
`hdbscan_scaling`: tests thread, NUMA, `n_samples` and `n_features` scalability of `HDBSCAN`.
8+
59
`nearest_neighbors`: tests performance of neighbors search implementations from `sklearnex`, `sklearn`, `raft`, `faiss` and `svs`.

‎configs/experiments/hdbscan_parameters.json‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,46 @@
11
{
22
"INCLUDE": ["../common/hdbscan.json"],
33
"PARAMETERS_SETS": {
4+
"hdbscan tree metrics": {
5+
"algorithm": {
6+
"estimator_params": { "metric": ["euclidean", "manhattan", "chebyshev"] }
7+
}
8+
},
9+
"hdbscan minkowski metric": {
10+
"algorithm": {
11+
"estimator_params": { "metric": "minkowski", "metric_params": { "p": 3 } }
12+
}
13+
},
14+
"hdbscan cosine metric": {
15+
"algorithm": {
16+
"estimator_params": { "metric": "cosine", "algorithm": "brute" }
17+
}
18+
},
19+
"hdbscan cluster selection sweep": {
20+
"algorithm": {
21+
"estimator_params": { "cluster_selection_method": ["eom", "leaf"] }
22+
}
23+
},
24+
"hdbscan density sweep": {
25+
"algorithm": {
26+
"estimator_params": { "min_cluster_size": [5, 25, 100], "min_samples": [5, 25] }
27+
}
28+
},
29+
"hdbscan store centers sweep": {
30+
"algorithm": {
31+
"estimator_params": { "store_centers": [null, "centroid", "medoid", "both"] }
32+
}
33+
},
34+
"hdbscan dtype sweep": {
35+
"data": { "dtype": ["float32", "float64"] }
36+
},
37+
"hdbscan data format sweep": {
38+
"data": [
39+
{ "format": "numpy", "order": "C" },
40+
{ "format": "numpy", "order": "F" },
41+
{ "format": "pandas", "order": "F" }
42+
]
43+
},
444
"hdbscan parameters data [tree]": {
545
"data": {
646
"source": "make_blobs",

‎configs/regular/hdbscan.json‎

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,12 @@
88
"split_kwargs": { "train_size": 100000 },
99
"preprocessing_kwargs": { "normalize": "standard" }
1010
},
11-
{
12-
"dataset": "road_network",
13-
"split_kwargs": { "train_size": 100000 },
14-
"preprocessing_kwargs": { "normalize": "standard" }
15-
},
16-
{
17-
"dataset": "covtype",
18-
"split_kwargs": { "train_size": 50000 },
19-
"preprocessing_kwargs": { "normalize": "standard" }
20-
},
2111
{
2212
"source": "make_blobs",
2313
"generation_kwargs": {
2414
"centers": 10,
2515
"n_samples": 100000,
26-
"n_features": [4, 16, 64],
16+
"n_features": 16,
2717
"cluster_std": 2.0
2818
},
2919
"split_kwargs": { "ignore": true }
@@ -37,22 +27,12 @@
3727
"split_kwargs": { "train_size": 20000 },
3828
"preprocessing_kwargs": { "normalize": "standard" }
3929
},
40-
{
41-
"dataset": "cifar",
42-
"split_kwargs": { "train_size": 15000 },
43-
"preprocessing_kwargs": { "normalize": "mean" }
44-
},
45-
{
46-
"dataset": "sensit",
47-
"split_kwargs": { "train_size": 25000 },
48-
"preprocessing_kwargs": { "normalize": "standard" }
49-
},
5030
{
5131
"source": "make_blobs",
5232
"generation_kwargs": {
5333
"centers": 10,
5434
"n_samples": 25000,
55-
"n_features": [64, 256, 1024],
35+
"n_features": 256,
5636
"cluster_std": 4.0
5737
},
5838
"split_kwargs": { "ignore": true }
@@ -61,12 +41,12 @@
6141
}
6242
},
6343
"TEMPLATES": {
64-
"hdbscan tree methods": {
44+
"hdbscan kd_tree": {
6545
"SETS": [
6646
"hdbscan sklearn-ex[cpu] implementations",
6747
"common hdbscan parameters",
6848
"sklearn hdbscan parameters",
69-
"hdbscan tree methods",
49+
"hdbscan kd_tree method",
7050
"hdbscan tree-friendly datasets"
7151
]
7252
},

‎configs/weekly/hdbscan.json‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"INCLUDE": ["../common/sklearn.json", "../common/hdbscan.json"],
3+
"PARAMETERS_SETS": {
4+
"high-load hdbscan tree-friendly datasets": {
5+
"data": [
6+
{
7+
"dataset": ["road_network", "covtype"],
8+
"split_kwargs": { "train_size": 100000 },
9+
"preprocessing_kwargs": { "normalize": "standard" }
10+
},
11+
{
12+
"source": "make_blobs",
13+
"generation_kwargs": {
14+
"centers": 10,
15+
"n_samples": 100000,
16+
"n_features": [4, 16, 64],
17+
"cluster_std": 2.0
18+
},
19+
"split_kwargs": { "ignore": true }
20+
}
21+
]
22+
},
23+
"high-load hdbscan brute-friendly datasets": {
24+
"data": [
25+
{
26+
"dataset": "cifar",
27+
"split_kwargs": { "train_size": 15000 },
28+
"preprocessing_kwargs": { "normalize": "mean" }
29+
},
30+
{
31+
"dataset": "sensit",
32+
"split_kwargs": { "train_size": 25000 },
33+
"preprocessing_kwargs": { "normalize": "standard" }
34+
},
35+
{
36+
"source": "make_blobs",
37+
"generation_kwargs": {
38+
"centers": 10,
39+
"n_samples": 25000,
40+
"n_features": [64, 256, 1024],
41+
"cluster_std": 4.0
42+
},
43+
"split_kwargs": { "ignore": true }
44+
}
45+
]
46+
}
47+
},
48+
"TEMPLATES": {
49+
"hdbscan tree methods": {
50+
"SETS": [
51+
"hdbscan sklearn-ex[cpu] implementations",
52+
"common hdbscan parameters",
53+
"sklearn hdbscan parameters",
54+
"hdbscan tree methods",
55+
"high-load hdbscan tree-friendly datasets"
56+
]
57+
},
58+
"hdbscan brute force": {
59+
"SETS": [
60+
"hdbscan sklearn-ex[cpu] implementations",
61+
"common hdbscan parameters",
62+
"sklearn hdbscan parameters",
63+
"hdbscan brute method",
64+
"high-load hdbscan brute-friendly datasets"
65+
]
66+
}
67+
}
68+
}

0 commit comments

Comments
 (0)