Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KMedoids: add PAM algorithm #46

Closed
rth opened this issue Dec 27, 2019 · 2 comments
Closed

KMedoids: add PAM algorithm #46

rth opened this issue Dec 27, 2019 · 2 comments

Comments

@rth
Copy link
Contributor

rth commented Dec 27, 2019

Following discussion in #44 (comment) it could be useful to add partitioning around medoids (PAM) algorithm to KMedoids,

From wikipedia:

  • Initialize: greedily select k of the n data points as the medoids to minimize the cost
  • Associate each data point to the closest medoid.
  • While the cost of the configuration decreases:
    • For each medoid m, and or each non-medoid data point o:
      • Consider the swap of m and o, and compute the cost change
      • If the cost change is the current best, remember this m and o combination
    • Perform the best swap of m_best and o_best, if it decreases the cost function. Otherwise, the algorithm terminates.

See "Clustering by Means of Medoids' Kaufman & Rousseeuw for more details. Also ESL book section 14.4.10 is worth reading.

@kno10
Copy link
Contributor

kno10 commented Feb 2, 2021

Resolved by #73?

@rth
Copy link
Contributor Author

rth commented Apr 14, 2021

Resolved by #73?

Indeed, thanks!

@rth rth closed this as completed Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants