3636| Lars Lenssen, Erich Schubert:
3737| Clustering by Direct Optimization of the Medoid Silhouette
3838| In: 15th International Conference on Similarity Search and Applications (SISAP 2022).
39+ | https://doi.org/10.1007/978-3-031-17849-8_15
3940
4041| Leonard Kaufman, Peter J. Rousseeuw:
4142| Clustering by means of medoids.
@@ -460,6 +461,7 @@ def fastmsc(diss, medoids, max_iter=100, init="random", random_state=None):
460461 | Lars Lenssen, Erich Schubert:
461462 | Clustering by Direct Optimization of the Medoid Silhouette
462463 | In: 15th International Conference on Similarity Search and Applications (SISAP 2022).
464+ | https://doi.org/10.1007/978-3-031-17849-8_15
463465
464466 :param diss: square numpy array of dissimilarities
465467 :type diss: ndarray
@@ -503,6 +505,7 @@ def fastermsc(diss, medoids, max_iter=100, init="random", random_state=None):
503505 | Lars Lenssen, Erich Schubert:
504506 | Clustering by Direct Optimization of the Medoid Silhouette
505507 | In: 15th International Conference on Similarity Search and Applications (SISAP 2022).
508+ | https://doi.org/10.1007/978-3-031-17849-8_15
506509
507510 :param diss: square numpy array of dissimilarities
508511 :type diss: ndarray
@@ -646,7 +649,7 @@ class SKLearnClusterer(BaseEstimator, ClusterMixin, TransformerMixin):
646649
647650
648651class KMedoids (SKLearnClusterer ):
649- """K-Medoids Clustering using PAM and FasterPAM (sklearn-compatible API).
652+ """K-Medoids Clustering using PAM, FasterPAM, and FasterMSC (sklearn-compatible API).
650653
651654 References:
652655
@@ -665,6 +668,7 @@ class KMedoids(SKLearnClusterer):
665668 | Lars Lenssen, Erich Schubert:
666669 | Clustering by Direct Optimization of the Medoid Silhouette
667670 | In: 15th International Conference on Similarity Search and Applications (SISAP 2022).
671+ | https://doi.org/10.1007/978-3-031-17849-8_15
668672
669673 | Leonard Kaufman, Peter J. Rousseeuw:
670674 | Clustering by means of medoids.
@@ -760,7 +764,9 @@ def fit(self, X, y=None):
760764 else :
761765 raise ValueError (
762766 f"method={ self .method } is not supported. Supported methods "
763- f"are 'fasterpam', 'fastpam1', 'pam' and 'alternate'."
767+ f"are 'fasterpam', 'fastpam1', 'pam', 'alternate', "
768+ f"'fastermsc', 'fastmsc', 'pamsil', and 'pammedsil'. "
769+ f"Recommended values are 'fasterpam' for classic k-medoids and 'fastermsc' for Silhouette optimization."
764770 )
765771 self .labels_ = result .labels
766772 self .medoid_indices_ = result .medoids
0 commit comments