accuracy_score

pai4sk.sml_metrics.accuracy_score(data, pred)

Distributed accuracy classification score. It supports both local and distributed(MPI) implementation.

This metric is often used in multi-class classification to compute the class prediction accuracy. It currently supports binary classification only. The metric is implemented in a distributed manner for MPI execution.

Parameters
  • data (Supports the following input data-types :) –

    1. Dense matrix (ndarray) of correct labels.

    2. SnapML data partition. This includes the correct labels.

  • pred (Predicted classes.) – array-like, shape = (n_samples,)

Returns

accuracy_value – Returns the accuracy score of the predicted classes (pred) when compared with the true labels (data).

Return type

float