dreamquark-ai / tabnet

PyTorch implementation of TabNet paper : https://arxiv.org/pdf/1908.07442.pdf
https://dreamquark-ai.github.io/tabnet/
MIT License
2.56k stars 473 forks source link

KeyError: (Some random Number) for pandas/csv file #417

Closed seanko29 closed 2 years ago

seanko29 commented 2 years ago

Describe the bug

Hello. My issue is that I am getting key error when I use tabnet.fit(x_train, y_train) for scikit-learn way of doing it. Also, if you do not use an eval set but only do clf.fit(x_train, y_train), should it work as well?

Thank you in advanced :)

What is the current behavior?

I am getting keyerror.

If the current behavior is a bug, please provide the steps to reproduce.

Expected behavior

Screenshots

image

Other relevant information: poetry version:
python version: Operating System: Additional tools:

Additional context

Optimox commented 2 years ago

Input for tabnet should be numpy matrices, have you tried X_train.values ?

That's some rare error you have here, can you try to get a minimal reproducible code so that we can try to reproduce it?

seanko29 commented 2 years ago

X_train.values, y_train.values and same for the test set worked for me! Thanks!