def uar_score(labels: np.ndarray,
predictions: np.ndarray):
"""
Computes the unweighted average recall for the specified true labels and predictions.
The unweighted average recall is simply the average recall for each class without any weighting.
Parameters
----------
labels: numpy.ndarray
A one-dimensional numpy array containing the true labels of instances
predictions
A one-dimensional numpy array containing the predicted labels of instances
Returns
-------
float
The unweighted average recall for the specified true labels and predictions
"""
return recall_score(labels, predictions, average="macro")
评论列表
文章目录