milia.cluster.models.hdbscan#
HDBSCAN: hierarchical density-based clustering.
Classes
|
HDBSCAN (Campello, Moulavi and Sander, 2013); needs no eps and no k. |
|
Validated hyperparameters of the HDBSCAN clusterer. |
- class milia.cluster.models.hdbscan.HDBSCAN(min_cluster_size=5, min_samples=None, metric='euclidean')#
Bases:
BaseClustererHDBSCAN (Campello, Moulavi and Sander, 2013); needs no eps and no k.
- Parameters:
Examples
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> X = np.repeat(np.array([[0.0, 0.0], [6.0, 6.0], [0.0, 6.0]]), 20, axis=0) + rng.normal( ... scale=0.4, size=(60, 2) ... ) >>> HDBSCAN().fit(X).n_clusters_ 3
- class milia.cluster.models.hdbscan.HDBSCANConfig(*, name='hdbscan', kind='clusterer', space=SearchSpace(min_cluster_size=(3, 50)), min_cluster_size=5, min_samples=None, metric='euclidean')#
Bases:
BaseModelConfigValidated hyperparameters of the HDBSCAN clusterer.
Fields mirror
HDBSCAN’s constructor;spaceis the default Optuna search space. Build the clusterer withmake("clusterer", "hdbscan", ...)orHDBSCAN(**config.params()).Examples
>>> HDBSCANConfig().name 'hdbscan'