Skip to content

DOC: added link to cluster_plot_coin_ward_segmentation example in feature_extraction.grid_to_graph #30916

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mahmadza
Copy link
Contributor

Reference Issues/PRs

Towards #30621

What does this implement/fix? Explain your changes.

Added a link to an example of structured Ward hierarchical clustering on an image of coins in feature_extraction.grid_to_graph method.

Copy link

github-actions bot commented Feb 28, 2025

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 562248e. Link to the linter CI: here

@StefanieSenger
Copy link
Contributor

Hi @mahmadza,

thanks a lot for your PR!

While checking this, I found there is a pretty nice explanation already in https://scikit-learn.org/stable/modules/feature_extraction.html#connectivity-graph-of-an-image

What would you think of instead of adding a link to the example on the docstring of the function, to add a link to this part of the user guide? I think it would be more informative and we have the example used as a demonstration in there. It could be done similarily as in PR #30666.

@mahmadza
Copy link
Contributor Author

mahmadza commented Mar 7, 2025

@StefanieSenger ,
In https://scikit-learn.org/stable/modules/feature_extraction.html#connectivity-graph-of-an-image, there is already a link to cluster_plot_coin_ward_segmentation.py. It's the first example.
Or did you mean something else?

@StefanieSenger
Copy link
Contributor

Hi @mahmadza,

sorry I think I did not express myself clearly before.

I will try again: What do you think about not linking the example, but instead linking to the user guide where the example is treated. This link could be in the same spot as you had added the original link (docstring of grid_to_graph). I think it's even better than the direct to the example itself, because this part of the user guide treats the example and adds context to it.

Copy link
Contributor

@StefanieSenger StefanieSenger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your work, @mahmadza! I appreciate that.

This PR looks very good and I would think it is ready to merge.
Would you check, @adrinjalali ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants