package prbnmcn-clustering

  1. Overview
  2. Docs

K-medoids functor.

type init =
  1. | Forgy
    (*

    Forgy selects k elements at random (without replacement) as initial centroids.

    *)
  2. | KmedoidsPP
    (*

    KmedoidsPP selects initial medoids iteratively with probabilities proportional to their distance to the previously selected centroids. This intuitively allows to spread them well.

    *)

Initial choice of medoids. This implementation provides several initialization algorithms, the standard one being Kmedoids++, identical to Kmeans++

type algorithm =
  1. | PAM
    (*

    PAM stands for Partition Around Medoids - the classical greedy algorithm. Costly.

    *)
  2. | VoronoiIteration
    (*

    Another heuristic, proceeding similarly to Lloyd's algorithm for Kmeans. Less costly (but still more than Kmeans) but perhaps less precise.

    *)

Algorithm used to perform partitioning.

type termination =
  1. | Num_iter of int
  2. | Threshold of float
  3. | Min of constraints

See K_means.

and constraints = {
  1. max_iter : int;
  2. threshold : float;
}
exception KmedoidsError of string

Exception thrown by k_medoids in case something goes awry.

module Make (E : Intf.Metric) : sig ... end