I am trying to compute the following
p = np.array([[.01,.05,.94],[.2,.6,.2],[.4,.35,.25]])
l = np.array([2,1,1])
aupr = average_precision_score(l, p, average="micro")
and get the following error
ValueError: y should be a 1d array, got an array of shape (3, 3) instead.
Seems to work fine when I change l to [2,1,0]. I thought it would pick up the number of classes from the p
matrix. What am I missing? Thx!