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:
where: -
is the total number of samples, - is the true label for the -th sample, - is the predicted label for the -th sample, - 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: