manujosephv / pytorch_tabular

A standard framework for modelling Deep Learning Models for tabular data
https://pytorch-tabular.readthedocs.io/
MIT License
1.34k stars 135 forks source link

Returns ValueError #152

Closed rezamousavi closed 1 year ago

rezamousavi commented 1 year ago

I'm really enjoying using this package. It returned an AUC of almost one on a test data. However, when I want to apply it to a data set with no labels (e.g. Kaggle competition data), it returns: ValueError: y contains previously unseen labels: [-3.2328808487512815]

code that results in error: tabular_model.predict(kaggleTest)

To get around this, I added the label column to the kaggle data by using 0 for each value. The results were all very close to zero as if the labels were used to create the predictions. Can you please help?

manujosephv commented 1 year ago

Can you give more details? A reproducible example?

And from what I've seen from what you mentioned, double check if you have, inadvertantly, added the target column as one of the features in the DataConfig..

rezamousavi commented 1 year ago

Thank you for the tip. That was the issue!

rezamousavi commented 1 year ago

Resolved the issue.