rasbt / mlxtend

A library of extension and helper modules for Python's data analysis and machine learning libraries.
https://rasbt.github.io/mlxtend/
Other
4.86k stars 857 forks source link

StackingCVRegressor: multi_output option #799

Closed ChromaticIsobar closed 3 years ago

ChromaticIsobar commented 3 years ago

I was interested in using the StackingCVRegressor for multioutput but I noticed that it only works for single-output. The only thing that prevents multioutput usage is the input validation function. I propose that multioutput could be optionally supported setting an initialization parameter.

You can find the (very short and simple) implementation on my fork https://github.com/ChromaticIsobar/mlxtend/compare/feature/multioutputstackingcv

I tried testing and style-checking but I get a lot of failures even on the unmodified upstream master branch

rasbt commented 3 years ago

This sounds like a good addition and would be happy to help adding it. Do you have a short self-contained input-output example for unit testing?

ChromaticIsobar commented 3 years ago

I copied it over from the CV-less StackingRegressor ChromaticIsobar@7b868d9e

I figured out what was wrong on my environment for testing. Now all unit tests pass (except one that requires tensorflow, that I don't have installed). Also, code-style checks pass

ChromaticIsobar commented 3 years ago

I also extended the docs a little ChromaticIsobar@975fb612

rasbt commented 3 years ago

Looks good! Would you mind opening a PR? In that case I can than make some additions to it regarding the docs and also adding support for the regular stacking regressor

ChromaticIsobar commented 3 years ago

I corrected the typo in the docs. Now I'll make the PR