Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
The MODECLUS Procedure

Density Estimation

Refer to Silverman (1986) or Scott (1992) for an introduction to nonparametric density estimation.

PROC MODECLUS uses (hyper)spherical uniform kernels of fixed or variable radius. The density estimate at a point is computed by dividing the number of observations within a sphere centered at the point by the product of the sample size and the volume of the sphere. The size of the sphere is determined by the smoothing parameters that you are required to specify.

For fixed-radius kernels, specify the radius as a Euclidean distance with either the DR= or R= option. For variable-radius kernels, specify the number of neighbors desired within the sphere with either the DK= or K= option; the radius is then the smallest radius that contains at least the specified number of observations including the observation at which the density is being estimated. If you specify both the DR= or R= option and the DK= or K= option, the radius used is the maximum of the two indicated radii; this is useful for dealing with outliers.

It is convenient to refer to the sphere of support of the kernel at observation xi as the neighborhood of xi. The observations within the neighborhood of xi are the neighbors of xi. In some contexts, xi is considered a neighbor of itself, but in other contexts it is not. The following notation is used in this chapter.

xi
the ith observation

d(x,y)
the distance between points x and y

n
the total number of observations in the sample

ni
the number of observations within the neighborhood of xi including xi itself

ni-
the number of observations within the neighborhood of xi not including xi itself

Ni
the set of indices of neighbors of xi including i

Ni-
the set of indices of neighbors of xi not including i

vi
the volume of the neighborhood of xi

\hat{f}_i
the estimated density at xi

\hat{f}_i^-
the cross-validated density estimate at xi

Ck
the set of indices of observations assigned to cluster k

v
the number of variables or the dimensionality

sl
standard deviation of the lth variable

The estimated density at xi is
\hat{f}_i = \frac{n_i}{nv_i}
that is, the number of neighbors of xi divided by the product of the sample size and the volume of the neighborhood at xi.

The density estimates provided by uniform kernels are not quite as good as those provided by some other types of kernels, but they are quite satisfactory for clustering. The significance tests for the number of clusters require the use of fixed-size uniform kernels.

There is no simple answer to the question of which smoothing parameter to use (Silverman 1986, pp. 43 -61, 84 -88, 98 -99). It is usually necessary to try several different smoothing parameters. A reasonable first guess for the K= option is in the range of 0.1 to 1 times n4/(v+4), smaller values being suitable for higher dimensionalities. A reasonable first guess for the R= option in many coordinate data sets is given by
{[ \frac{2^{v+2}(v+2)\Gamma(\frac{v}2+1)}{nv^2} ]}^{1/(v+4)}
 \sqrt{ \sum_{l=1}^vs_l^2}
which can be computed in a DATA step using the GAMMA function for \Gamma.This formula is derived under the assumption that the data are sampled from a multivariate normal distribution and, therefore, tend to be too large (oversmooth) if the true distribution is multimodal. Robust estimates of the standard deviations may be preferable if there are outliers. If the data are distances, the factor \sum{s_l}^2 can be replaced by an average (mean, trimmed mean, median, root-mean-square, and so on) distance divided by \sqrt{2}.To prevent outliers from appearing as separate clusters, you can also specify K=2 or CK=2 or, more generally, K=m or CK=m, m \geq 2,which in most cases forces clusters to have at least m members.

If the variables all have unit variance (for example, if you specify the STD option), you can use Table 42.2 to obtain an initial guess for the R= option.

Table 42.2: Reasonable First Guess for R= for Standardized Data
Number Number of Variables
of Obs 1 2 3 4 5 6 7 8 9 10
201.011.361.772.232.733.253.814.384.985.60
350.911.241.642.082.563.083.624.184.775.38
500.841.171.561.992.462.973.504.064.645.24
750.781.091.471.892.352.853.383.934.505.09
1000.731.041.411.822.282.773.293.834.404.99
1500.680.971.331.732.182.663.173.714.274.85
2000.640.931.281.672.112.583.093.624.174.75
3500.570.851.181.561.982.442.933.454.004.56
5000.530.801.121.491.912.362.843.353.894.45
7500.490.741.061.421.822.262.743.243.774.32
10000.460.711.011.371.772.202.673.163.694.23
15000.430.660.961.301.692.112.573.063.574.11
20000.400.630.921.251.632.052.502.993.494.03


One data-based method for choosing the smoothing parameter is likelihood cross validation (Silverman 1986, pp. 52 -55). The cross-validated density estimate at an observation is obtained by omitting the observation from the computations.

\hat{f}_i^{-} = \frac{n_i^{-}}{nv_i}

The (log) likelihood cross-validation criterion is then computed as
\sum_{i=1}^n{\log\hat{f}_i^{-}}

The suggested smoothing parameter is the one that maximizes this criterion. With fixed-radius kernels, likelihood cross validation oversmooths long-tailed distributions; for purposes of clustering, it tends to undersmooth short-tailed distributions. With k-nearest-neighbor density estimation, likelihood cross validation is useless because it almost always indicates k=2.

Cascaded density estimates are obtained by computing initial kernel density estimates and then, at each observation, taking the arithmetic mean, harmonic mean, or sum of the initial density estimates of the observations within the neighborhood. The cascaded density estimates can, in turn, be cascaded, and so on. Let _{k}\hat{f}_i be the density estimate at xi cascaded k times. For all types of cascading, _{0}\hat{f}_i = \hat{f}_i.If the cascading is done by arithmetic means, then, for k \geq 0,

_{k+1}{\hat{f}_i} = {\sum_{j\in{N_i}}{_k}{\hat{f}_j}}/{n_i}

For harmonic means,

_{k+1}{\hat{f}_i} =
 {( {\sum_{j\in{N_i}}{_k}{\hat{f}_j^{-1}} }/{n_i} ) }^{-1}

and for sums,
_{k+1}{\hat{f}_i} =
 {( \sum_{j\in{N_i}}{_k}{\hat{f}_j^{k+1}} ) }^{\frac{1}{k+2}}

To avoid cluttering formulas, the symbol \hat{f}_i is used from now on to denote the density estimate at xi whether cascaded or not, since the clustering methods and significance tests do not depend on the degree of cascading.

Cascading increases the smoothness of the estimates with less computation than would be required by increasing the smoothing parameters to yield a comparable degree of smoothness. For population densities with bounded support and discontinuities at the boundaries, cascading improves estimates near the boundaries. Cascaded estimates, especially using sums, may be more sensitive to the local covariance structure of the distribution than are the uncascaded kernel estimates. Cascading seems to be useful for detecting very nonspherical clusters. Cascading was suggested by Tukey and Tukey (1981, p. 237). Additional research into the properties of cascaded density estimates is needed.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.