sklearn_clustering#
Source code: sensai/clustering/sklearn_clustering.py
- class SkLearnClustererProtocol(*args, **kwargs)[source]#
Bases:
Protocol
Only used for type hints, do not instantiate
- labels_: ndarray#
- class SkLearnEuclideanClusterer(clusterer: SkLearnClustererProtocol, noise_label=- 1, min_cluster_size: Optional[int] = None, max_cluster_size: Optional[int] = None)[source]#
Bases:
EuclideanClusterer
Wrapper around an sklearn-type clustering algorithm
- Parameters:
clusterer – a clusterer object compatible the sklearn API
noise_label – label that is associated with the noise cluster or None
min_cluster_size – if not None, clusters below this size will be labeled as noise
max_cluster_size – if not None, clusters above this size will be labeled as noise