Skip to content

Conversation

@floriankozikowski
Copy link
Contributor

@floriankozikowski floriankozikowski commented Apr 28, 2025

Context

The example plot_group_logistic_regression.py was missing a plot, so it looked empty in the doc gallery.

Contributions of the PR

This PR adds a simple bar plot to the example plot_group_logistic_regression.py to visualize group sparsity after training.
The plot shows the L2 norm of coefficients for each group, illustrating which groups were kept or removed by the regularization.

Note:
Due to the small synthetic dataset, interpretability of the resulting sparsity pattern is limited.

Checklist before merging

  • The code runs correctly locally.
  • The visualization is correctly generated.
  • Documentation gallery should now show a figure for this example.
  • Consider discussing an alternative plot (e.g. heatmap)

Closes issue #297

…arsity in plot_group_logistic_regression.py
@mathurinm mathurinm merged commit 21dd86c into scikit-learn-contrib:main Apr 28, 2025
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants