graphclust.validity.clustering_rate#

graphclust.validity.clustering_rate(y_true, y_pred)[source]#

Fraction of samples in correctly matched clusters (Hungarian matching of the labels).

Noise labels (-1) in y_pred count as errors.

Examples

>>> clustering_rate([0, 0, 1, 1], [1, 1, 0, 0])
1.0

Examples using graphclust.validity.clustering_rate#

Zahn’s MST clustering and the chaining effect

Zahn's MST clustering and the chaining effect

Hybrid MST–Gath–Geva clustering cuts the chain

Hybrid MST--Gath--Geva clustering cuts the chain

Hybrid MST–GG on the Iris data

Hybrid MST--GG on the Iris data

HDBSCAN*: density-corrected spanning trees

HDBSCAN*: density-corrected spanning trees

Jarvis–Patrick clustering and its two integer parameters

Jarvis--Patrick clustering and its two integer parameters

Fuzzy neighborhood similarity: MDS, VAT and dendrogram

Fuzzy neighborhood similarity: MDS, VAT and dendrogram

Fuzzy neighborhood distances on the Wine data

Fuzzy neighborhood distances on the Wine data

Shared-neighbor density and density peaks

Shared-neighbor density and density peaks

Spectral clustering and graph communities

Spectral clustering and graph communities