I have a beginner high level question about pytorch optimizer, namely is there a non-custom way to optimize for true positives? Let's say that i have a list of labels:
labels=[0,0,0,0,0,0,0,0,0,1]
And I would like a model to fit to those labels in a way that would favor a true positive - aka i really would like it to return '1' as last item, and i am not that concerned about false positive '1's for other items in a list.
I presume i can workaround this problem by defining a custom loss function which would give me weights for true positives / false positives, but i was wondering if there is an out of the box solution for that.
Kind regards.