From 98da8d0182f7ac47dd20e2627e43894cf43e2480 Mon Sep 17 00:00:00 2001 From: tassonem <146456756+tassonem@users.noreply.github.com> Date: Tue, 11 Mar 2025 21:24:45 -0500 Subject: [PATCH] Adding reference to image segmentation --- sklearn/cluster/_spectral.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sklearn/cluster/_spectral.py b/sklearn/cluster/_spectral.py index e563eac014174..63727020ac155 100644 --- a/sklearn/cluster/_spectral.py +++ b/sklearn/cluster/_spectral.py @@ -388,6 +388,11 @@ class SpectralClustering(ClusterMixin, BaseEstimator): If the affinity matrix is the adjacency matrix of a graph, this method can be used to find normalized graph cuts [1]_, [2]_. + For an example of spectral clustering applied to image segmentation + using normalized cuts, see + :ref:`sphx_glr_auto_examples_cluster_plot_segmentation_toy.py` + + When calling ``fit``, an affinity matrix is constructed using either a kernel function such the Gaussian (aka RBF) kernel with Euclidean distance ``d(X, X)``::