skm: Simple k-medoid algorithm

View source: R/skm.R

skmR Documentation

Simple k-medoid algorithm

Description

This function runs the simple k-medoid algorithm proposed by Budiaji and Leisch (2019).

Usage

skm(distdata, ncluster, seeding = 20, iterate = 10)

Arguments

distdata

A distance matrix (n x n) or dist object.

ncluster

A number of clusters.

seeding

A number of seedings to run the algorithm (see Details).

iterate

A number of iterations for each seeding (see Details).

Details

The simple k-medoids, which sets a set of medoids as the cluster centers, adapts the simple and fast k-medoid algoritm. The best practice to run the simple and fast k-medoid is by running the algorithm several times with different random seeding options.

Value

Function returns a list of components:

cluster is the clustering memberships result.

medoid is the id medoids.

minimum_distance is the distance of all objects to their cluster medoid.

Author(s)

Weksi Budiaji
Contact: budiaji@untirta.ac.id

References

W. Budiaji, and F. Leisch. 2019. Simple K-Medoids Partitioning Algorithm for Mixed Variable Data. Algorithms Vol 12(9) 177

Examples

num <- as.matrix(iris[,1:4])
mrwdist <- distNumeric(num, num, method = "mrw")
result <- skm(mrwdist, ncluster = 3, seeding = 50)
table(result$cluster, iris[,5])



kmed documentation built on Aug. 29, 2022, 9:06 a.m.