cratepy.clustering.clusteringphase.CRMP¶
- class CRMP[source]¶
Bases:
ABC
Cluster-Reduced Material Phase interface.
- _update_cluster_labels(labels, min_label=0)[source]¶
Update cluster labels starting with the provided minimum label.
Constructor.
List of Public Methods
Get cluster-reduced material phase adaptivity type.
Get current number of clusters.
Get valid clustering algorithms to compute the CRMP.
Perform CRMP base clustering.
Methods
- static _update_cluster_labels(labels, min_label=0)[source]¶
Update cluster labels starting with the provided minimum label.
- Parameters:
labels (numpy.ndarray (1d)) – Cluster labels (numpy.ndarray[int] of shape (n_items,)).
min_label (int, default=0) – Minimum cluster label.
- Returns:
new_labels (numpy.ndarray (1d)) – Updated cluster labels (numpy.ndarray[int] of shape (n_items,)).
max_label (int) – Maximum cluster label.
- abstract get_clustering_type()[source]¶
Get cluster-reduced material phase adaptivity type.
- Returns:
clustering_type – Type of cluster-reduced material phase.
- Return type:
- abstract get_n_clusters()[source]¶
Get current number of clusters.
- Returns:
n_clusters – Number of material phase clusters.
- Return type: