Skip to content

Commit 0008438

Browse files
kno10rth
andauthored
DOC fix: The algorithm explained - and implemented - in K-Medoids… (#44)
Co-authored-by: Roman Yurchak <[email protected]>
1 parent ffcf96f commit 0008438

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

doc/user_guide.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ clusters. This makes it more suitable for smaller datasets in comparison to
4949

5050
**Algorithm description:**
5151
There are several algorithms to compute K-Medoids, though :class:`KMedoids`
52-
currently only supports Partitioning Around Medoids (PAM). The PAM algorithm
53-
uses a greedy search, which may fail to find the global optimum. It consists of
54-
two alternating steps commonly called the
55-
Assignment and Update steps (BUILD and SWAP in Kaufmann and Rousseeuw, 1987).
52+
currently only supports K-Medoids solver analogous to K-Means. Other frequently
53+
used approach is partitioning around medoids (PAM) which is currently not
54+
implemented.
5655

57-
PAM works as follows:
56+
This version works as follows:
5857

5958
* Initialize: Select ``n_clusters`` from the dataset as the medoids using
6059
a heuristic, random, or k-medoids++ approach (configurable using the ``init`` parameter).
@@ -65,7 +64,7 @@ PAM works as follows:
6564

6665
.. topic:: References:
6766

68-
* "Clustering by Means of Medoids'"
69-
Kaufman, L. and Rousseeuw, P.J.,
70-
Statistical Data Analysis Based on the L1Norm and Related Methods, edited
71-
by Y. Dodge, North-Holland, 405416. 1987
67+
* Maranzana, F.E., 1963. On the location of supply points to minimize
68+
transportation costs. IBM Systems Journal, 2(2), pp.129-135.
69+
* Park, H.S. and Jun, C.H., 2009. A simple and fast algorithm for K-medoids
70+
clustering. Expert systems with applications, 36(2), pp.3336-3341.

sklearn_extra/cluster/_k_medoids.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,10 @@ class KMedoids(BaseEstimator, ClusterMixin, TransformerMixin):
9090
9191
References
9292
----------
93-
Kaufman, L. and Rousseeuw, P.J., Statistical Data Analysis Based on
94-
the L1–Norm and Related Methods, edited by Y. Dodge, North-Holland,
95-
405–416. 1987
93+
Maranzana, F.E., 1963. On the location of supply points to minimize
94+
transportation costs. IBM Systems Journal, 2(2), pp.129-135.
95+
Park, H.S.and Jun, C.H., 2009. A simple and fast algorithm for K-medoids
96+
clustering. Expert systems with applications, 36(2), pp.3336-3341.
9697
9798
See also
9899
--------

0 commit comments

Comments
 (0)