Skip to content
New issue

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

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

Already on GitHub? # to your account

UserWarning: object dtype is not supported by sparse matrices #20

Closed
smarie opened this issue Jul 7, 2022 · 1 comment
Closed

UserWarning: object dtype is not supported by sparse matrices #20

smarie opened this issue Jul 7, 2022 · 1 comment

Comments

@smarie
Copy link
Contributor

smarie commented Jul 7, 2022

From the gallery example

from qdscreen import qd_screen

# detect strict deterministic relationships
qd_forest = qd_screen(df)

# Fit selector model
qd_forest.fit_selector_model(df)

yields

UserWarning: object dtype is not supported by sparse matrices
  warnings.warn("object dtype is not supported by sparse matrices")

It seems that this is not supported but works...
https://stackoverflow.com/questions/47845327/convert-numpy-object-array-to-sparse-matrix

@smarie
Copy link
Contributor Author

smarie commented Jul 11, 2022

Fixed by #11 but apparently this also happens in the sklearn adapter:

from qdscreen.sklearn import QDScreen

X = [[0, 2, 0, 3],
     [0, 1, 4, 3],
     [0, 1, 1, 3]]

selector = QDScreen()
Xsel = selector.fit_transform(X)

@smarie smarie closed this as completed in a22b39a Jul 11, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant