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

Boolean DataFrame incorrect shape #436

Open
enricorox opened this issue Oct 27, 2023 · 0 comments
Open

Boolean DataFrame incorrect shape #436

enricorox opened this issue Oct 27, 2023 · 0 comments

Comments

@enricorox
Copy link

Describe the bug
Passing boolean DataFrames gives Found array with 0 feature(s) and displays only the DummyClassifier.
There are no warnings about the data type, only incorrect shape.

To Reproduce
Execute the snippet

import numpy as np
import pandas as pd
from lazypredict.Supervised import LazyClassifier
from sklearn.model_selection import train_test_split

X = pd.DataFrame(np.random.choice([True, False], size=(10, 3)), columns=list('ABC'))
y = pd.DataFrame(np.random.choice([True, False], size=(10, 1)), columns=list('F'))

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=.5, random_state=123)
clf = LazyClassifier(verbose=0, ignore_warnings=False, custom_metric=None)
models, predictions = clf.fit(X_train, X_test, y_train, y_test)
print(models)

Expected behavior
Correctly handle boolean DataFrames

Desktop (please complete the following information):

  • OS: Ubuntu 22.04
  • Version 0.2.12

Workaround
https://stackoverflow.com/questions/77357871/lazypredict-found-array-with-0-features

giulliadeux added a commit to giulliadeux/lazypredict that referenced this issue Oct 29, 2023
giulliadeux added a commit to giulliadeux/lazypredict that referenced this issue Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant