Closed chmxu closed 11 months ago
thx for your question, we will mention or revise it later. It generally doesn't affect the results as long as the given y_true and y_pred are matched. Since F1 = 2 (precision recall) / (precision + recall), switching the notation of positive and negative class is equivalent to switching precision and recall which will not affect the result.
But we admit this may provoke some confusion, so we will revise it after the issue is closed, thx again.
Thank you for your reply!
Thank you for this inspiring work! I have a question about the calculation of F1 score. As I can understand the data loading code snippet, the positive samples have label 0 (https://github.com/wxr99/HolisticPU/blob/main/dataset/cifar.py#L170). However when calculating F1 score in (https://github.com/wxr99/HolisticPU/blob/main/utils/misc.py#L46) the sklearn function
f1_score
used set defaultpos_label=1
. I am not sure if this would lead to some problems.