How to build a multi-label & multi-class dataset correctly?
I am unsure how to proceed creating aDatasetwith multiple labels and classes where the classes arenot the samefor the different labels.A multi-label example is sharedhere, but the classes are always either0or1. My task is slightly different. To illustrate what I mean, take this dataset:text (X)region (y₁)weather (y₂)sentiment (y₃)‘The Taj Mahal was beautiful, even in monsoon season’‘asia’‘rain’‘positive’‘Surprisingly warm in London with blue skies…’‘europe’‘sun’‘positive’‘Snowstorms and icey roads in Illinios, will never go there again!!!’‘america’‘snow’‘negative’‘I sincerely enjoyed my Safari despite the hot temperatures’‘africa’‘sun’‘positive’text: The input to predict the three outputs.region: First output to predict, four possible classes'asia','europe','america','africa'weather: Second output to predict, three possible classes'rain','sun','snow'sentiment: Third output to predict, two possible classes'positive','negative'The questions stemming from such a multi-label/multi-class task:What are the right types ofFeatures? Fortext, it shall beValue(dtype='string', id=None)feature type, which will be tokenized.The outputs are supposed to saved in alabelsfeature, illustrated intutorialswith theClassLabel. So for theregionlabel it should be something like this:ClassLabel(num_classes=3, names=['asia', 'europe', 'america'], id=None). But how does it work with three outputs anddifferentnames?I tried looking into this where thelabelsfeature would be of typeSequence(seethis post).However, as@lhoestqpointed out, they should have their own columns. Otherwise,namesends up havingallclasses in one place, e.g.,Sequence(ClassLabel(names=['asia', 'europe', 'america', 'africa', 'rain', 'sun', 'snow', 'positive', 'negative']))which would be wrong (?).So now I am conflicted how to build my dataset to predict all labels and classes at once correctly.More questions arising from this once we start training the model:Given the above dataset, how would theid2labelandlabel2iddicts be structured?What would be the correctnum_labelspassed on to the model? Would it be3due to the three columns to predict? Or would it be9(4+3+2) due to the different outcomes?Theproblem_typeshould bemulti_label_classification, right? (asking because in previous trainings I ran into issues with tensor sizes not matching and some issues with Float and Long)Thanks!