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

Add multiple graph option #315

Open
lcrmorin opened this issue May 1, 2024 · 5 comments · May be fixed by #320
Open

Add multiple graph option #315

lcrmorin opened this issue May 1, 2024 · 5 comments · May be fixed by #320
Labels
enhancement New feature or request good first issue Good for newcomers
Projects

Comments

@lcrmorin
Copy link

lcrmorin commented May 1, 2024

I am usually using individual optbinning plots for data exploration. This is done trough a for loop.
I was wondering if there could be a default multi-plot for opt-binning. This would be my default function fo data exploration.
Typically, nowadays the best option is the pandas hist (see below).

Screenshot 2024-05-01 at 08 19 05

It would be very nice to have such a plot with binning and target dependency for data exploration.

@bmreiniger
Copy link
Contributor

bmreiniger commented May 1, 2024

What do your loops look like? Are you using a BinningProcess, getting each underlying variable, and using the associated table's plot method? In which case, we could just add a plot method to BinningProcess that does that? Should OptimalBinning and friends directly expose a plot as an intermediate?

@guillermo-navas-palencia guillermo-navas-palencia added enhancement New feature or request good first issue Good for newcomers labels May 3, 2024
@guillermo-navas-palencia
Copy link
Owner

Hi @lcrmorin. Indeed, it would be a nice addition. Would you be willing to work on this feature?

@lcrmorin
Copy link
Author

lcrmorin commented May 5, 2024

I was trying to do it myself. Ultimately my problem relates more to positioning the plots on the grid, than optbinning itself.

@bmreiniger
Copy link
Contributor

I think adding an ax parameter to the tables' plot method (to be an existing pyplot axis object, or None to create a new one; this is how pandas and sklearn both implement many plotting utilities IIRC?) would be an improvement in general, and would also make this easier. BinningProcess would just have to make_subplots then iterate over zip(axes, _binning_variables)? If I have some time I'll give a PR a go, but happy to let someone else try instead.

@bmreiniger
Copy link
Contributor

I've started looking more seriously at the code, and I don't really use the 2d or pw or streaming binners; should they all support plotting?

In a BinningProcess, should the relevant statistics tables have build run first (with default parameters, or try to pass keywords through based on the type of column?)?

@bmreiniger bmreiniger linked a pull request Jun 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
ToDo
  
Awaiting triage
Development

Successfully merging a pull request may close this issue.

3 participants