How to choose and plot the quality criterion in `kml` function?

断了今生、忘了曾经 提交于 2020-04-30 06:38:45

问题


I just started working with the kml package to perform longitudinal k-means clustering in R.

By default the kml function uses the Calinski Harabatz Sorted criterion to choose the 'best' clustering. So by accessing the 'best' clustering you will always see the Calinski Harabatz Sorted criterion.

How can we choose another quality criterion?


A minimal example:

library(kml)
# some data
cld <- generateArtificialLongData(25)
# perform clustering
kml(cold)

# choose the 'best' clustering:
choice(cld)

This plots something like:

So we see the actual data, clustering and on the left side the quality criterion. Now for 'Calinski Harabatz Unsorted' the 'optimal' number is four clusters. But what if we choose another quality criterion?

To plot another solution with a differing number of clusters I can for example do:

plot(cld, 3, toPlot = 'both')

So here we see a clustering with three clusters and still the same criterion from above.


How can we plot the quality criterion for another measure, e.g. Ray and Turie?

来源:https://stackoverflow.com/questions/61323782/how-to-choose-and-plot-the-quality-criterion-in-kml-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!