autointent.metrics.regexp.regexp_partial_accuracy#

autointent.metrics.regexp.regexp_partial_accuracy(y_true, y_pred)#

Calculate regexp partial accuracy.

The regexp partial accuracy is calculated as:

Partial Accuracy=i=1N1(ytrue,iypred,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.metrics.custom_types.LABELS_VALUE_TYPE) – True values of labels

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

Returns:

Score of the regexp metric

Return type:

float