<p>This is the assessment of the suitability of clustering. Cluster Tendency determines whether the data has any inherent grouping structure.</p>
<p>This is a hard task since there are so many different definitions of clusters (portioning, hierarchical, density, graph, etc.) Even after fixing a cluster type, this is still hard in defining an appropriate null model for a data set.</p>
<p>One way we can go about measuring cluster tendency is to compare the data against random data. On average, random data should not contain clusters.</p>
<p>There are some clusterability assessment methods such as Spatial histogram, distance distribution and Hopkins statistic.</p>
<h2>Hopkins Statistic</h2>
<p>Let $X$ be the set of $n$ data points in $d$ dimensional space. Consider a random sample (without replacement) of $m << n$ data points. Also generate a set $Y$ of $m$ uniformly randomly distributed data points.</p>
<p>Now define two distance measures $u_i$ to be the distance of $y_i \in Y$ from its nearest neighbor in X and $w_i$ to be the distance of $x_i \in X$ from its nearest neighbor in X</p>
<p>We can then define Hopkins statistic as
$$
H = \frac{\sum_{i = 1}^m{u<em>i^d}}{\sum</em>{i = 1}^m{u<em>i^d} + \sum</em>{i =1}^m{w_i^d}}
$$</p>
<h3>Properties</h3>
<p>With this definition, uniform random data should tend to have values near 0.5, and clustered data should tend to have values nearer to 1.</p>
<h3>Drawbacks</h3>
<p>However, data containing a single Gaussian will also score close to one. As this statistic measures deviation from a uniform distribution. Making this statistic less useful in application as real data is usually not remotely uniform.</p>
<h2>Spatial Histogram Approach</h2>
<p>For this method, I'm not too sure how this works, but here are some key points I found.</p>
<p>Divide each dimension in equal width bins, and count how many points lie in each of the bins and obtain the empirical joint probability mass function.</p>
<p>Do the same for the randomly sampled data</p>
<p>Finally compute how much they differ using the Kullback-Leibler (KL) divergence value. If it differs greatly than we can say that the data is clusterable.</p>