A quick forum search and looking through the fastai docs didn’t turn up anything so now I’m posting here. I’m trying to use the datablock api to setup NLP for regressing 5 numbers.
My data looks like this and I want to predict a number from 1-5 each for Location/Food/Social/Opportunities/Safety:
For NLP single-regression (e.g. just Safety), the datablock API works fine and creates a FloatList as my target:
I can create a learner from this which has MSELossFlat and everything works as expected.
However, when I try to have multiple regression outputs, the datablock api treats it as a multi-classification problem of predicting a class, 1-5, for each of Location/Food/Social/Opportunities/Safety:
I went ahead and trained it anyway, and results were much worse when compared to the NLP single-regression version, which I assume is because if it’s treating Safety_1 and Safety_5 as just different classes, it’s lost the meaning that a safety rating of 1 is much closer to a safety rating of 2 with the Multi Category treatment.
So at this point, I’m trying to figure out how to get a TextDataBunch with my y: as a rank2 FloatList? Is there something in the datablock api for that?