Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] model.fit leads to TypeError #211

Open
jbottke opened this issue Feb 11, 2025 · 1 comment
Open

[BUG] model.fit leads to TypeError #211

jbottke opened this issue Feb 11, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jbottke
Copy link

jbottke commented Feb 11, 2025

Describe the bug
When trying to fit a classification model on the adult census dataset, the training process results in a TypeError while trying to concatenate an integer to a string in datamodule.py

To Reproduce

  • load adult census dataset using shapiq with shapiq.datasets.load_adult_census()
  • preprocess data using sklearns train_test_split() function which shuffles dataset und splits it into four numpy arrays (x_train, x_test, y_train, y_test)
  • create Instance of MambularClassifier and fit it on numpy arrays x_train, y_train

Expected behavior
Method is expected to further process training data and use it to train model. After that, the best model parameters are expected to be saved under model_checkpoints.

Screenshots

Image

Desktop:

  • OS: Ubuntu via WSL2
  • Python version 3.10.12
  • Mambular Version 1.1.0
@jbottke jbottke added the bug Something isn't working label Feb 11, 2025
@jbottke
Copy link
Author

jbottke commented Feb 11, 2025

One is able to avoid the Problem by converting x_train from a numpy array to a pandas dataframe with named columns. It is important for the columns of the dataframe to be Strings. y_train can be a numpy array after all.

@jbottke jbottke changed the title [BUG] [BUG] model.fit leads to TypeError Feb 11, 2025
@AnFreTh AnFreTh self-assigned this Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants