Title: | Check the Clustering Tendency |
---|---|
Description: | Calculate some statistics aiming to help analyzing the clustering tendency of given data. In the first version, Hopkins statistic is implemented. See Hopkins and Skellam (1954) <doi:10.1093/oxfordjournals.aob.a083391>. |
Authors: | Kevin Wright [aut, cre] , Luo YiLan [aut], Zeng RuTong [aut] |
Maintainer: | Kevin Wright <[email protected]> |
License: | MIT + file LICENSE |
Version: | 1.7 |
Built: | 2024-11-16 03:48:34 UTC |
Source: | https://github.com/kwstat/clustertend |
Calculate Hopkins statistic of given data.
hopkins(X, n = ceiling(nrow(X)/10))
hopkins(X, n = ceiling(nrow(X)/10))
X |
Data (matrix or data.frame) to check clusterability. |
n |
The number of rows to sample from X. The default is 1/10th the number of rows of X. |
Note: Package clustertend
is deprecated.
Use package hopkins
instead.
Sample data must be preprocessed into dataframe or matrix form before given as the value of parameter "data".
The value returned is actually 1-Hopkins statistic.
Kevin Wright, Luo YiLan, Zeng RuTong.
Lawson, R.G. and Jurs, P.C.(1990). New index for clustering tendency and its application to chemical problems. Journal of Chemical Information and Computer Sciences. 30(1):36-41.
set.seed(1) hopkins(iris[,-5], n=15)
set.seed(1) hopkins(iris[,-5], n=15)