Skip to main content

DaviesBouldin

Metric
DashAI.back.metrics.clustering.DaviesBouldin

Average similarity between each cluster and its closest cluster.

Davies-Bouldin compares within-cluster dispersion with separation between clusters. Lower values indicate that clusters are compact and far from one another. A value of 0 is ideal, though uncommon in real datasets.

Range: [0, +inf), lower is better (MAXIMIZE = False).

References​

Methods​

score(x: 'DashAIDataset | pd.DataFrame', labels: 'np.ndarray | list') -> float | None

Defined on DaviesBouldin

Calculate the Davies-Bouldin score for clustering assignments.

Parameters

x : DashAIDataset or pandas.DataFrame
Feature data used by the clustering model.
labels : np.ndarray or list
Cluster labels assigned to each sample.

Returns

float | None
Davies-Bouldin score, or None when the score is not defined for the current label distribution.

get_metadata(cls: 'BaseMetric') -> Dict[str, Any]

Defined on BaseMetric

Get metadata values for the current metric.

Returns

Dict[str, Any]
Dictionary with the metadata

get_registry(cls) -> Dict[str, Type[ForwardRef('ClusteringMetric')]]

Defined on ClusteringMetric

Return concrete clustering metric classes keyed by class name.

Compatible with​