Hey guys, Im trying to use the newest version of Fastai tabular.
So Im getting a regression output which is not what I want, the thing is my dependant variable is a feature of integers values (from 1 to 14) only, for some reason the model only has 1 output that is in decimals. In the past Fastai would automatically make it a classification problem if the dependant variable column is in integers, am I missing something?
Do I have to specify something in the codes to make it a classification problem?
For your reference, the following is my codes (extracted):
cont_nn, cat_nn = cont_cat_split(train_valid, max_card=9000, dep_var=dep_var)
splits = (list(train_idx),list(valid_idx))
dep_var = ‘place’ ### place column is within [1,2,3,4,5,6,7,8,9,10,11,12,13,14]
procs = [FillMissing, Categorify, Normalize]
to_nn = TabularPandas(train_valid, procs, cat_nn, cont_nn, splits=splits, y_names=dep_var)
dls = to_nn.dataloaders(64)
learn = tabular_learner(dls, layers=[500,250], metrics=accuracy, ps=[0.001,0.01], emb_drop=0.04)
test_df = test.copy()
test_df.drop([‘place’], axis=1, inplace=True)
dl = learn.dls.test_dl(test_df)
Output of predictions: