Skip to content

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

Merged
adrinjalali merged 2 commits into
scikit-learn:mainfrom
mahmadza:add-example-link-plot-coin-ward-segmentation
May 5, 2025
Merged

adrinjalali merged 2 commits into
scikit-learn:mainfrom
mahmadza:add-example-link-plot-coin-ward-segmentation

Conversation

@mahmadza

Copy link
Copy Markdown
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.

@github-actions

github-actions Bot commented Feb 28, 2025 •

Copy link
Copy Markdown

✔️ 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
Copy Markdown
Member

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

mahmadza commented Mar 7, 2025

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Member

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.

@StefanieSenger StefanieSenger left a comment

Copy link
Copy Markdown
Member

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 ?

@adrinjalali

Copy link
Copy Markdown
Member

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.

That's a very nice catch @StefanieSenger !

@adrinjalali
adrinjalali merged commit 2d78745 into scikit-learn:main May 5, 2025
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.

4 participants