Learn R Programming

clustertend (version 1.6)

hopkins: Calculate the Hopkins' statistic

Calculate the Hopkins' statistic of given data.

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".

Description

Calculate the Hopkins' statistic

Calculate the Hopkins' statistic of given data.

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".

Usage

hopkins(X, n = ceiling(nrow(X)/10))

Value

The value returned is actually 1-Hopkins statistic.

Arguments

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.

Author

Luo YiLan, Zeng RuTong.

References

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.

Examples

Run this code
set.seed(1)
hopkins(iris[,-5], n=15)

Run the code above in your browser using DataLab