clustering_base#
Source code: sensai/clustering/clustering_base.py
- class EuclideanClusterer(noise_label=- 1, min_cluster_size: Optional[int] = None, max_cluster_size: Optional[int] = None)[source]#
Bases:
PickleLoadSaveMixin
,ABC
Base class for all clustering algorithms. Supports noise clusters and relabelling of identified clusters as noise based on their size.
- Parameters:
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
- clusters(condition: Optional[Callable[[Cluster], bool]] = None) Iterable[Cluster] [source]#
- Parameters:
condition – if provided, only clusters fulfilling the condition will be included
- Returns:
generator of clusters
- summary_df(condition: Optional[Callable[[Cluster], bool]] = None)[source]#
- Parameters:
condition – if provided, only clusters fulfilling the condition will be included
- Returns:
pandas DataFrame containing coarse information about the clusters
- property is_fitted#
- property datapoints: ndarray#
- property labels: ndarray#
- property cluster_identifiers: Set[int]#
- property num_clusters: int#