Skip to content

KMedoids: add PAM algorithm #46

Closed
Closed
@rth

Description

@rth

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions