Replies: 1 comment
-
By convention : in binary classification, our models always return only one probability when calling
You might want to switch your convention to that of scikit-learn to avoid a lot of headache ;) |
Beta Was this translation helpful? Give feedback.
-
Hi everybody,
i want to evaluate my model using the precision recall scores, because my data is unbalanced. Since I have a binary classification I am using a softmax at the end of my NN.
The output scores and true labels look something like :
Where
y_score[:,0]
corresponds to the probability of class 0.My positive labels are 0 and thus the negative labels are 1 in my case.
Since my dataset is unbalanded (more negatives than positives) I want to use the precision recall score (AUPRC) to evaluate my classifier. The function
sklearn.metrics.precision_recall_curve
takes a parameterpos_label
, which I would set topos_label = 0
. But the parameterprobas_pred
takes an ndarray of probabilities of shape (n_samples,).
My question is, which of my
y_score
column should I take forprobas_pred
since I setpos_label = 0
and why?I hope my question is clear.
Thank you in advance!
Beta Was this translation helpful? Give feedback.
All reactions