I have a very large data set with 9000 observations and 25 categorical variables, which I've transformed into binary data and preformed hierarchical clustering and K-modes clustering in R.
library(klaR)
cluster <- list()
for(k in 1:8)
{
cluster[[paste0("k.", k)]] <- kmodes(data, k,iter.max=100)
}
I would like to know
1) if it's better to specify the number of modes k
(where the algorithm chooses a random set of distinct rows from the data as the initial modes) or to specify the initial starting values/modes myself (give it a set of initial distinct cluster modes in replace of k
). If the later, how do you decide on meaningful initial modes? For example for k=4
, can I specify the initial modes to be 4 rows from the hierarchical binary clustering output where I cut the tree at k=4
?
2) how many times I should run the algorithm and
3) if 100 iterations is adequate.