This function runs Kmodes. The user must choose the number of clusters and the initial modes.
kmodes(data, k, k2)
Arguments
data: data should be a matrix or data frame, columns include the variables.
k: number of clusters
k2: set of initial modes; indices of data points
Details
This function clusters the rows of the data.
References
Huang, Z. (1998). Extensions to the v-means Algorithm for Clustering Large Data Sets with Categorical Values, Data Mining and Knowledge Discovery, 2, 283-304.
Examples
data("zoo")## on zoo data with 7 clusters and the first seventh observations as initial modeskmodes(zoo$obs,k=7,1:7)## with seven random initial modes selected from data pointskmodes(zoo$obs,k=7,sort(sample(dim(zoo$obs)[1],7)))