Skip to main content

Module metrics

Module metrics 

Source
Expand description

Evaluation metrics for regression, classification and clustering.

See the book entry Foundations.

Functionsยง

accuracy
The fraction of labels predicted correctly.
adjusted_rand_index
The adjusted Rand index between two clusterings of the same points (1 = identical up to relabelling, about 0 for random agreement). Noise is treated as one extra group.
confusion_matrix
The confusion matrix m[true][predicted] over classes classes.
mean_absolute_error
mean_squared_error
Mean squared error.
precision_recall_f1
Per-class (precision, recall, f1); a class with no predictions or no members scores 0.
r2_score
The coefficient of determination 1 - SS_res / SS_tot (1 is perfect; can be negative; a constant target gives 1 for exact predictions and -inf otherwise).
root_mean_squared_error
silhouette_score
The mean silhouette coefficient over clustered points (noise, None, is ignored). Values near 1 mean tight, well-separated clusters; needs at least two clusters.