4949| Silhouettes: A graphical aid to the interpretation and validation of cluster analysis
5050| Journal of Computational and Applied Mathematics, Volume 20, 1987
5151| https://doi.org/10.1016/0377-0427(87)90125-7
52+
53+ | Mark Van der Laan, Katherine Pollard, Jennifer Bryan:
54+ | A new partitioning around medoids algorithm.
55+ | In: Journal of Statistical Computation and Simulation, pp 575-584, 2003
56+ | https://doi.org/10.1080/0094965031000136012
57+
5258"""
5359__all__ = [
5460 "pam" ,
@@ -368,6 +374,7 @@ def pammedsil(diss, medoids, max_iter=100, init="build", random_state=None):
368374 | Mark Van der Laan, Katherine Pollard, Jennifer Bryan:
369375 | A new partitioning around medoids algorithm.
370376 | In: Journal of Statistical Computation and Simulation, pp 575-584, 2003
377+ | https://doi.org/10.1080/0094965031000136012
371378
372379 :param diss: square numpy array of dissimilarities
373380 :type diss: ndarray
@@ -409,6 +416,7 @@ def pamsil(diss, medoids, max_iter=100, init="build", random_state=None):
409416 | Mark Van der Laan, Katherine Pollard, Jennifer Bryan:
410417 | A new partitioning around medoids algorithm.
411418 | In: Journal of Statistical Computation and Simulation, pp 575-584, 2003
419+ | https://doi.org/10.1080/0094965031000136012
412420
413421 :param diss: square numpy array of dissimilarities
414422 :type diss: ndarray
@@ -654,6 +662,10 @@ class KMedoids(SKLearnClusterer):
654662 | https://doi.org/10.1007/978-3-030-32047-8_16
655663 | Preprint: https://arxiv.org/abs/1810.05691
656664
665+ | Lars Lenssen, Erich Schubert:
666+ | Clustering by Direct Optimization of the Medoid Silhouette
667+ | In: 15th International Conference on Similarity Search and Applications (SISAP 2022).
668+
657669 | Leonard Kaufman, Peter J. Rousseeuw:
658670 | Clustering by means of medoids.
659671 | In: Dodge Y (ed) Statistical Data Analysis Based on the L 1 Norm and Related Methods, 405-416, 1987
@@ -662,6 +674,11 @@ class KMedoids(SKLearnClusterer):
662674 | Finding Groups in Data: An Introduction to Cluster Analysis.
663675 | John Wiley&Sons, 1990, https://doi.org/10.1002/9780470316801
664676
677+ | Mark Van der Laan, Katherine Pollard, Jennifer Bryan:
678+ | A new partitioning around medoids algorithm.
679+ | In: Journal of Statistical Computation and Simulation, pp 575-584, 2003
680+ | https://doi.org/10.1080/0094965031000136012
681+
665682 :param n_clusters: The number of clusters to form
666683 :type n_clusters: int
667684 :param metric: It is recommended to use 'precomputed', in particular when experimenting with different `n_clusters`.
@@ -670,7 +687,7 @@ class KMedoids(SKLearnClusterer):
670687 :param metric_params: Additional keyword arguments for the metric function.
671688 :type metric_params: dict, default=None
672689 :param method: Which algorithm to use
673- :type method: string, "fasterpam" (default), "fastpam1", "pam" or "alternate "
690+ :type method: string, "fasterpam" (default), "fastpam1", "pam", "alternate", "fastermsc", "fastmsc", "pamsil" or "pammedsil "
674691 :param init: initialization method
675692 :type init: string, "random" (default), "first" or "build"
676693 :param max_iter: Specify the maximum number of iterations when fitting
@@ -730,6 +747,14 @@ def fit(self, X, y=None):
730747 result = fastpam1 (X , self .n_clusters , self .max_iter , self .init , random_state = self .random_state )
731748 elif self .method == "pam" :
732749 result = pam (X , self .n_clusters , self .max_iter , self .init , random_state = self .random_state )
750+ elif self .method == "fastermsc" :
751+ result = fastermsc (X , self .n_clusters , self .max_iter , self .init , random_state = self .random_state )
752+ elif self .method == "fastmsc" :
753+ result = fastmsc (X , self .n_clusters , self .max_iter , self .init , random_state = self .random_state )
754+ elif self .method == "pamsil" :
755+ result = pamsil (X , self .n_clusters , self .max_iter , self .init , random_state = self .random_state )
756+ elif self .method == "pammedsil" :
757+ result = pammedsil (X , self .n_clusters , self .max_iter , self .init , random_state = self .random_state )
733758 elif self .method == "alternate" :
734759 result = alternating (X , self .n_clusters , self .max_iter , self .init , random_state = self .random_state )
735760 else :
0 commit comments