But it is found already from LabelBinarizer. The best way is to do it internally in compute_class_weight. I shall fix it tonight.