skrub icon indicating copy to clipboard operation
skrub copied to clipboard

[FEAT] Add a plot_topics method to `GapEncoder`

Open Vincent-Maladiere opened this issue 1 year ago • 6 comments

Problem Description

One of the GapEncoder 's main features is its interpretability. The documentation shows how to plot a heatmap representing activations across topics and their content, but getting this representation right is time-consuming.

Feature Description

I suggest we bring this method directly into the GapEncoder class.

Alternative Solutions

Creating a separate function elsewhere, akin to sklearn.tree.plot_tree, but at the cost of being less practical and visible.

Additional Context

No response

Vincent-Maladiere avatar Oct 22 '24 10:10 Vincent-Maladiere

I agree this would be useful; see also https://github.com/skrub-data/skrub/discussions/909#discussioncomment-9571065

jeromedockes avatar Oct 22 '24 10:10 jeromedockes

Yup!

But can we have a generic methods (ie get_report()), which could be used everywhere in skrub?

GaelVaroquaux avatar Oct 22 '24 13:10 GaelVaroquaux

But can we have a generic methods (ie get_report()), which could be used everywhere in skrub?

Can you elaborate a bit on this @GaelVaroquaux? Do you see get_report also working for TextEncoder and MinHashEncoder?

Vincent-Maladiere avatar Oct 22 '24 14:10 Vincent-Maladiere

Can you elaborate a bit on this @GaelVaroquaux? Do you see get_report also working for TextEncoder and MinHashEncoder?

Maybe. But to me, it's more a question of something homogeneous in the library: we could have this on the Recipe (or whatever, I don't know).

I would love it if people would have a one-stop command to ask an object: give me a useful visualization of what you have in your belly. Something a bit more powerful than the default repr.

GaelVaroquaux avatar Oct 22 '24 15:10 GaelVaroquaux

Very interesting! Could we list somewhere the kind of visualizations we would like to see for some objects?

Vincent-Maladiere avatar Oct 22 '24 16:10 Vincent-Maladiere

Very interesting! Could we list somewhere the kind of visualizations we would like to see for some objects?

yes let's make a list and do a sprint :)

jeromedockes avatar Oct 22 '24 16:10 jeromedockes