autointent.metrics.decision_accuracy#

autointent.metrics.decision_accuracy(y_true, y_pred)#

Calculate decision accuracy. Supports both multiclass and multilabel.

The decision accuracy is calculated as:

Accuracy=i=1N1(ytrue,i=ypred,i)N

where:

  • N is the total number of samples,

  • ytrue,i is the true label for the i-th sample,

  • ypred,i is the predicted label for the i-th sample,

  • 1(condition) is the indicator function that equals 1 if the condition

is true and 0 otherwise.

Parameters:
  • y_true (autointent.custom_types.ListOfGenericLabels) – True values of labels

  • y_pred (autointent.custom_types.ListOfGenericLabels) – Predicted values of labels

Returns:

Score of the decision accuracy

Return type:

float