DistrictDataLabs / yellowbrick

Visual analysis and diagnostic tools to facilitate machine learning model selection.
http://www.scikit-yb.org/
Apache License 2.0
4.3k stars 559 forks source link

Interactive plots - support plotly backend. #1309

Open elphick opened 1 year ago

elphick commented 1 year ago

Interactive visualisations, such as those generated by plotly, provide additional information on hover.

While the current static matplotlib plots are great, I feel the interactive nature of plotly plots will take this to another level.

I've created a few examples here that I'm finding useful. I'd love to kill off my repo and instead contribute interactive plots to yellowbrick. I'd be happy to contribute plot development, but would likely need help by others to develop the support for a plotly backend in a sustainable way first.

Is there any interest in this proposal?

bbengfort commented 1 year ago

@elphick absolutely we would certainly be interested in your proposal.

As a start, I would suggest adding the visualizations you've created to the contrib package in Yellowbrick and getting them documented; that way people can start using them immediately. Please feel free to open a pull request and we can start the discussion there.

After that, we'd have to figure out a way to allow for different plotting backends -- which would mean separating the visualization code from the visual analysis code. Making such a significant change would likely be a Yellowbrick 2.0 effort because unfortunately in the current code base, the visualization code is pretty strongly coupled with the visualizers themselves. Do you know of other libraries that have different visualization backends for plotly vs matplotlib? That would be a good starting point to figuring out how to do that.

elphick commented 1 year ago

@bbengfort, Thanks for that guidance. I'll check-out the contrib package when I can, and select a suitable example to create a PR for.

Not sure on the best example package supporting both matplotlib and plotly backends but will do some research.

elphick commented 1 year ago

It turns out that pandas supports multiple plotting backends, such as plotly, so I'll check out how that has been implemented.

bbengfort commented 1 year ago

Awesome, thanks @elphick let me know if you want to discuss anything!