How to choose the weigh in imbalanced data?

Hi, equation (1) in this paper computes binary cross entropy as you said.

Also, I found this: