Permalink
Browse files

ENH: spectral clustering doc and style improvements (pep8, docstrings…

…, references, variable names)
  • Loading branch information...
1 parent 9ebbd25 commit 525dc1fecfe3041025e607cf2e78484dad916c32 @ogrisel ogrisel committed Apr 25, 2011
Showing with 198 additions and 117 deletions.
  1. +26 −9 doc/modules/clustering.rst
  2. +172 −108 scikits/learn/cluster/spectral.py
View
@@ -15,7 +15,7 @@ data can be found in the `labels_` attribute.
.. currentmodule:: scikits.learn.cluster
-.. topic:: Input data
+.. topic:: Input data
One important thing to note is that the algorithms implemented in
this module take different kinds of matrix as input. On one hand,
@@ -41,7 +41,6 @@ be specified. It scales well to large number of samples, however its
results may be dependent on an initialisation.
-
Affinity propagation
====================
@@ -121,6 +120,24 @@ function of the gradient of the image.
* :ref:`example_cluster_plot_lena_segmentation.py`: Spectral clustering
to split the image of lena in regions.
+.. topic:: References:
+
+ * `"A Tutorial on Spectral Clustering"
+ <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.165.9323>`_
+ Ulrike von Luxburg, 2007
+
+ * `"Normalized cuts and image segmentation"
+ <http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.160.2324>`_
+ Jianbo Shi, Jitendra Malik, 2000
+
+ * `"A Random Walks View of Spectral Segmentation"
+ <http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.33.1501>`_
+ Marina Meila, Jianbo Shi, 2001
+
+ * `"On Spectral Clustering: Analysis and an algorithm"
+ <http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.19.8100>`_
+ Andrew Y. Ng, Michael I. Jordan, Yair Weiss, 2001
+
.. _hierarchical_clustering:
@@ -132,20 +149,20 @@ build nested clusters by merging them successively. This hierarchy of
clusters represented as a tree (or dendrogram). The root of the tree is
the unique cluster that gathers all the samples, the leaves being the
clusters with only one sample. See the `Wikipedia page
-<http://en.wikipedia.org/wiki/Hierarchical_clustering for more
-details>`_.
+<http://en.wikipedia.org/wiki/Hierarchical_clustering>`_ for more
+details.
-
-The :class:`Ward` object performs a hierarchical clustering based on Ward
-algorithm, that is a variance-minimizing approach. At each step, it
-minimizes the sum of squared differences within all clusters (inertia
-criterion).
+The :class:`Ward` object performs a hierarchical clustering based on
+the Ward algorithm, that is a variance-minimizing approach. At each
+step, it minimizes the sum of squared differences within all clusters
+(inertia criterion).
This algorithm can scale to large number of samples when it is used jointly
with an connectivity matrix, but can be computationally expensive when no
connectivity constraints are added between samples: it considers at each step
all the possible merges.
+
Adding connectivity constraints
----------------------------------
Oops, something went wrong.

0 comments on commit 525dc1f

Please sign in to comment.