opened

  
    
    
    Loss function with small amount of positives 
  
  
    Hello, 
I have a binary classification model. My data is having 1 million samples, and only 100 of the are tagged with 1 (rest tagged with 0). 
My model now is a simple fully-connected. 
I’m having some problems with finding a loss function that will be able to overcome the small amount of true positives. 
I saw BCEWithLogitsLoss, but had some problems with it, so I used the next loss function I run into (which actually makes the same, I think) : 
def weighted_binary_cross_entropy(output, target…