pycrostates.metrics.silhouette_score#
- pycrostates.metrics.silhouette_score(cluster)[source]#
Compute the mean Silhouette Coefficient.
This function computes the Silhouette Coefficient[1] with
sklearn.metrics.silhouette_score()from a fitted Clustering instance.- Parameters:
- clusterCluster
Fitted clustering algorithm from which to compute score. For more details about current clustering implementations, check the Clustering section of the documentation.
- Returns:
- silhouette
float The mean Silhouette Coefficient.
- silhouette
Notes
For more details regarding the implementation, please refer to
sklearn.metrics.silhouette_score(). This proxy function usesmetric="precomputed"with the absolute spatial correlation for distance computations.References