Balancing the ratio of positive and negative samples

67 views
Skip to first unread message

ibal

unread,
Dec 30, 2015, 10:04:01 AM12/30/15
to Caffe Users
Hello everyone,

I have a pixel level labeling problem, and in my training data the number of negative samples is much higher than positive samples. So I need some sort of balancing of the data. 

One way is to weight every sample with the inverse of its class probability to reduce the contribution of negative sample during loss calculation. The other option is to use all the positive samples, and randomly select a subset of negative samples to have a good pos/neg ratio.

More specifically, I am trying to follow this step from a paper "After FC6 we select all positive and random negative samples to keep the pos/neg ratio as 25%/75%.". 

I am new to caffe, and not sure how can I achieve this task. Any suggestions?

Thanks
Reply all
Reply to author
Forward
0 new messages