accuracy_score#

cuml.metrics.accuracy_score(y_true, y_pred, *, sample_weight=None, normalize=True)[source]#

Accuracy classification score.

Parameters:
y_truearray-like of shape (n_samples,)

Ground truth (correct) labels.

y_predarray-like of shape (n_samples,)

Predicted labels.

sample_weightarray-like of shape (n_samples,)

Sample weights.

normalizebool

If False, return the number of correctly classified samples. Otherwise, return the fraction of correctly classified samples.

Returns:
scorefloat

The fraction of correctly classified samples, or the number of correctly classified samples if normalize == False.