Yes, your approach looks generally correct.
A simple choice for pos_weights
would be num_negatives / num_positives
as it will weight the positive samples so that they have approx. the same influence on the loss.
Yes, your approach looks generally correct.
A simple choice for pos_weights
would be num_negatives / num_positives
as it will weight the positive samples so that they have approx. the same influence on the loss.