Skip to content

Commit

Permalink
DOC Add links to AgglomerativeClustering examples in docs and the use…
Browse files Browse the repository at this point in the history
…r guide (scikit-learn#28885)
  • Loading branch information
yuanx749 committed Apr 25, 2024
1 parent 171e124 commit db58c6f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion doc/modules/clustering.rst
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,9 @@ Single linkage can also perform well on non-globular data.
* :ref:`sphx_glr_auto_examples_cluster_plot_digits_linkage.py`: exploration of
the different linkage strategies in a real dataset.

* :ref:`sphx_glr_auto_examples_cluster_plot_linkage_comparison.py`: exploration of
the different linkage strategies in toy datasets.


Visualization of cluster hierarchy
----------------------------------
Expand All @@ -714,6 +717,10 @@ of the data, though more so in the case of small sample sizes.
:target: ../auto_examples/cluster/plot_agglomerative_dendrogram.html
:scale: 42

.. topic:: Examples:

* :ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_dendrogram.py`


Adding connectivity constraints
-------------------------------
Expand Down Expand Up @@ -1042,7 +1049,7 @@ scales by building an alternative representation of the clustering problem.
.. topic:: Examples:

* :ref:`sphx_glr_auto_examples_cluster_plot_hdbscan.py`

Mutual Reachability Graph
-------------------------

Expand Down
6 changes: 6 additions & 0 deletions sklearn/cluster/_agglomerative.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,9 @@ class AgglomerativeClustering(ClusterMixin, BaseEstimator):
.. versionadded:: 0.20
Added the 'single' option
For examples comparing different `linkage` criteria, see
:ref:`sphx_glr_auto_examples_cluster_plot_linkage_comparison.py`.
distance_threshold : float, default=None
The linkage distance threshold at or above which clusters will not be
merged. If not ``None``, ``n_clusters`` must be ``None`` and
Expand All @@ -860,6 +863,9 @@ class AgglomerativeClustering(ClusterMixin, BaseEstimator):
.. versionadded:: 0.24
For an example of dendrogram visualization, see
:ref:`sphx_glr_auto_examples_cluster_plot_agglomerative_dendrogram.py`.
Attributes
----------
n_clusters_ : int
Expand Down

0 comments on commit db58c6f

Please sign in to comment.