multi_label=False not work as i would expect

#2
by Aminadaven - opened

hi and thanks for all the work!

I'm trying to use the model and i just copied the example from the "Model card" page. oddly, i get multiple lables even when i'm setting multi_label=False.
if this is intended, is there a different between setting this setting to true and just taking the first label on the list? am i missing something here (i am quite new to this so it is possible)

image.png

Hey, this works as intended. Explanation:
multi_label=False turns the task into a "multi-class" task, where you only want to choose one out of all the classes/labels. This means that you get probabilities for all classes/labels and you select the one with the highest probability as the correct one. In different words: with multi_label=False, exactly one label out of many is the correct one (the one with the highest probability). Use this if, for your specific task, you only want to choose a single class/label out of the options you provide.
multi_label=True turns the task into a "multi-label" task, where one, many or no class/label can be correct. In this case, the correctness of each label is checked independently and all or no classes/labels can be correct. For example, a text can be simultaneously about "economy" and "politics" or, depending on the text, none can be correct.
hope that helps

test it with different input texts and you should see the difference

thanks a lot for the explanation!!

Aminadaven changed discussion status to closed

Sign up or log in to comment