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

Support for sparse matrices in StackingClassifier with use_features_in_secondary=True #408

Closed
FlorisHoogenboom opened this issue Jul 5, 2018 · 4 comments

Comments

@FlorisHoogenboom
Copy link
Contributor

When using StackingClassifier with use_features_in_secondary=True and using a sparse matrix as input one runs into a value error on calling fit: ValueError: all the input arrays must have same number of dimensions. This seems caused by the fact that the results of the meta estimator cannot be concatenated to the sparse matrix.

Would you consider adding support for sparse matrices with use_features_in_secondary set to True? If so, I would be happy to open a PR for this!

@rasbt
Copy link
Owner

rasbt commented Jul 5, 2018

Thanks for the note! Having support for thios would be awesome, and I would appreciate a PR!

I think this might also affect the StackingCVClassifier, StackingRegressor, and StackingCVRegressor. However, we can tackle them one by one, and starting with the StackingClassifier would be great

@FlorisHoogenboom
Copy link
Contributor Author

You are probably right, I believe the logic for merging the meta estimator output and the original feature matrix is the same for all of those. I hope to have some time next week to have a look at those as well and will submit a PR for those seperately.

@rasbt
Copy link
Owner

rasbt commented Jul 19, 2018

Thanks for the PR the other day! After all this physical labor associated with moving I felt like coding today and already implemented it for the rest, in case you are wondering

@FlorisHoogenboom
Copy link
Contributor Author

Awesome!

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

2 participants