Hopkins.index: Non-randomness of data

Description Usage Arguments Value See Also Examples

Description

Hopkins.index calculates the Hopkins index that can be used as an indicator of the non-randomness of data prior to clustering.

Usage

1

Arguments

data

A numeric matrix.

Value

The Hopkins index as a numeric value

See Also

The index is described in, e.g.: Han, Jiawei; Kamber, Micheline (2010): Data mining. Concepts and techniques. 2nd ed., Amsterdam: Elsevier/Morgan Kaufmann (The Morgan Kaufmann series in data management systems).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
#Random data generation, 10 dimensions, 500 observations, 2 clusters, 
#Multivariate-Bernoulli distributed
require("gtools")
data = c()
p = 0.0
for (i in 1:2)
{
temp = c()
for (j in 1:10)
temp = cbind(temp, rbinom(250, 1, p+(i-1)*0.5+(0.025*i)*j))  
data=rbind(data, temp)
}
data = data[permute(1:500),]

Hopkins.index(data)

## End(Not run)

Example output

This is package 'modeest' written by P. PONCET.
For a complete list of functions, use 'library(help = "modeest")' or 'help.start()'.

Warning messages:
1: In rgl.init(initValue, onlyNULL) : RGL: unable to open X11 display
2: 'rgl_init' failed, running with rgl.useNULL = TRUE 
3: .onUnload failed in unloadNamespace() for 'rgl', details:
  call: fun(...)
  error: object 'rgl_quit' not found 
Loading required package: gtools
[1] 0.9310345

comato documentation built on May 2, 2019, 6:52 a.m.

Related to Hopkins.index in comato...