The simple and fast k-medoids, which sets a set of medoids as the
cluster centers, adapts the k-means algorithm for medoid up-dating.
The new medoids of each iteration are calculated in the within cluster
only such that it gains speed.
init = NULL
is required because the Park and Jun (2009) has
a particular method to select the initial medoids. The initial medoids
are selected by
$$ v_j = \sum_{i=1}^n \frac{d_{ij}}{\sum_{l=1}^n d_{il}},
\quad j = 1, 2, 3, \ldots, n $$
where the first k of the \(v_j\) is selected if the number of
clusters is k.
init
can be provided with a vector of id objects. The length of
the vector has to be equal to the number of clusters. However, assigning
a vector in the init
argument, the algorithm is no longer the simple
and fast k-medoids algorithm. The inckmed
function,
for example, defines a different method to select the initial medoid
though it applies the fastkmed
function.