Hi all,
In an image binary classification problem, I’ve got an unbalanced dataset (10 000 positives for 200 000 negatives).
The metric I want to optimize is Precision : I need positive to be mostly true positive when an image is predicted as positive.
So as expected If I equally randomly split my train dataset (5000 POS / 5000 NEG) I got acceptable precision on an equally splitted test dataset (70%) but very poor on a REAL unbalanced dataset (24%).
How do i train my model for high precision with pytorch ?
Today i am using this optimizer :
criterion = nn.CrossEntropyLoss()
optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9)
Thanks all for your help,
Nicolas