mlxtend icon indicating copy to clipboard operation
mlxtend copied to clipboard

Using pandas dataframes in bias-variance-docmposition

Open prateek-bricklane opened this issue 2 years ago • 3 comments

Describe the workflow you want to enable

Using bias variance decomposition with pandas dataframe. Since scikit learn now supports pandas api train test splits are available as pandas dataframes for some workflows. Raising an error when passing these as inputs to bias_variance_decomp, just makes us use an extra step outside mlxtend that is out of context of more general workflow (that is accomplished entire in pandas dataframes).

Describe your proposed solution

Instead of raising error with a message, convert pandas dataframes to numpy arrays internally.

Describe alternatives you've considered, if relevant

An alternative would be a config parameter for the package like scikit-learn that can more generally handle dataframes across range of functionalities either by converting to numpy arrays or implementing functionalities compatible with dataframes.

Additional context

prateek-bricklane avatar Oct 24 '23 08:10 prateek-bricklane

Thanks for the suggestion. This would be a nice addition indeed. Unfortunately, I am a bit overcommitted and don't know when/if I would have time to implement this.

rasbt avatar Oct 28 '23 14:10 rasbt

Happy to give it a try :)

prateek-bricklane avatar Oct 30 '23 00:10 prateek-bricklane

If you have time and are interested to work on this, I'd appreciate the contribution 😊

rasbt avatar Oct 31 '23 13:10 rasbt