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:
silhouettefloat

The mean Silhouette Coefficient.

Notes

For more details regarding the implementation, please refer to sklearn.metrics.silhouette_score(). This proxy function uses metric="precomputed" with the absolute spatial correlation for distance computations.

References

Examples using pycrostates.metrics.silhouette_score#

Evaluating clustering fits

Evaluating clustering fits