STATISTICAL CLASSIFICATION
2.5 NEAREST SHRUNKEN CENTROIDS
The nearest shrunken centroids (NSC) procedure was proposed by Tibshirani et al. (2001) and aims to identify a subset of predictor variables which best characterises the different classes (or the smallest subset of predictors which can accurately classify samples). NSC is a modification of the nearest centroid method and can be applied to classification problems as well as in unsupervised problems (Tibshirani et al., 2001:6567). Nearest centroid classification applied to a test case π computes the (Euclidean) distance between π and each of the class centroids and then classifies π to the class whose centroid is closest to π. The main drawback of nearest centroid classification is that is uses all the predictors, which is not desirable in for example microarray problems where π β« π. NSC modifies this method by βshrinkingβ each of the class centroids towards the overall centroid for all the classes. The idea behind NSC is that predictors whose class specific centroids are close to the overall mean centroid should not play a role in classification. Therefore, NSC continuously shrinks the predictor variables until only a few have an influence on the classification. After shrinking the class centroids, a test sample is then classified by the usual nearest centroid rule, but using the shrunken, hopefully denoised class centroids. In NSC, one must choose a shrinkage parameter, β, which influences the number of predictors used in computing the shrunken centroids. If β = 0, then all the predictors are used to compute the centroids. Tibshirani et al. (2001) propose that cross-validation should be used to determine the optimal value of β, denoted by βπππ‘.
This section proceeds with a more detailed description of NSC, based on Tibshirani et al. (2001) and Hastie et al. (2009, Section 18.2). Let π₯ππ denote the values for predictor π,
π = 1,2, β¦ , π and observations π = 1,2, β¦ , π. Also, let π₯Μ ππ be the centroid (mean value) of
variable π in class π. The overall centroid (mean value) for the ππ‘β predictor is given by
π₯Μ π = βππ=1π₯πππ.
In the binary case, it is clear that if the group-specific mean values π₯Μ π1 and π₯Μ π2 do not differ significantly from the overall centroid π₯Μ π (and therefore π₯Μ π1 and π₯Μ π2 do not differ significantly from each other), then input variable π will most probably not play a significant role in accurate classification. The NSC method shrinks the class-specific, π₯Μ ππ, towards the
overall centroids, π₯Μ π. If the shrinkage takes π₯Μ π1 and π₯Μ π2 all the way to the overall centroid, variable ππ is effectively removed from the NSC classifier.
Consider the more detailed explanation for the general case of πΊ groups. Let πππ
represent the shrunken difference for the ππ‘β predictor. This is similar to a π‘-statistic for
predictor π which compares the mean of class π to the overall centroid, namely πππ = π₯Μ ππ β π₯Μ π ππ(π π+ π 0) , (2.4) where ππ = βπ1 π+ 1
π and π π is the pooled within-class standard deviation for predictor π.
Assuming πΊ = 2, π π2 = 1 π β 2(β(π₯ππ β πΜ j1) 2 πβπΆ1 + β(π₯ππ β πΜ j2)2 πβπΆ2 ).
Therefore πππ π is equal to the estimated standard error of the numerator in πππ in (2.4).
In (2.4), π 0 denotes a small positive constant (regularisation parameter) which guards
against large πππ values that arise from predictors with near zero values. Tibshirani et al. (2001:6568) state that π 0 is typically set equal to the median of the π π-values over the set
of predictors, and has the same value for all the predictors. Tibshirani et al. (2003:107) explain that Equation (2.4) takes the size of each class into consideration and effectively applies a larger threshold to smaller (high variance) classes.
Equation (2.4) can also be written in the form
π₯Μ ππ = π₯Μ π+ ππ(π π+ π 0)πππ.
Note that the normalisation by π π in (2.4) has the effect of giving higher weight to predictors that have stable expression within observations of the same class (Tibshirani et al., 2003:107).
The procedure now shrinks πππ towards zero using the soft thresholding operator, giving πππβ² = π πππ(π
ππ)(|πππ| β β)+, (2.5) where β is determined by choosing the threshold that yields the minimum cross-validation misclassification error rate. In (2.5) each |πππ| is reduced by an amount β until it reaches zero. The subscript in (2.5) ( )+, indicates positive part, therefore π‘+ = π‘ if π‘ > 0, and zero otherwise. This is shown in Figure 2.2 below.
Figure 2.2: Soft thresholding function used in the NSC methodology Source: Tibshirani et al., 2003:106
In Figure 2.2, the soft thresholded function given in (2.5) is shown by the red dotted line, and the 45Β° line is shown in grey. The black bold dotted line between the red and grey lines represents β. If a predictor has πππβ² = 0 for all classes, then the centroid for predictor π, πΜ π is the same for all classes and therefore the predictor does not contribute to
classification. In Figure 2.2 it is clear that as β becomes larger, there will be more predictors with πππβ² = 0 and therefore more predictors are eliminated, leaving only the most significant predictors as discriminating features. It is clear that the tuning parameter in this process is the quantity β and that care has to be taken to specify its value. It is recommended that the value of β should be determined using cross-validation (CV). In such a process one typically chooses the largest value of β (resulting in the smallest number of predictors) that achieves the minimal cross-validation error (Tibshirani et al., 2003:107). Note that in scenarios where there are several solutions with minimal cross- validation error rates, the optimal threshold value (number of genes) can either by chosen as the value with the largest likelihood or the one with the smallest number of genes (larger penalty). For the purpose of this thesis the latter method will be used if there is more than one threshold value yielding the minimal CV error rate.
Note that soft thresholding, as implemented in the NSC procedure, typically produces more reliable estimates of the true means since many of the π₯Μ ππ values will be noisy and close to the overall mean π₯Μ π (Donoho and Johnstone, 1994).
Hard thresholding can be used as an alternative to the soft thresholding in (2.5) (Tibshirani et al., 2003:111). Hard thresholding retains all the predictors with differences
πππ
β ββ
greater than β in absolute value and discards the other predictors. This implies that (2.5) changes to
πππβ² = πππ β πΌ(|πππ| > β).
From the equation above it is clear that hard thresholding differs from soft thresholding shown in (2.5) in the sense that instead of shrinking all the πππβs by an amount β towards
zero (as in (2.5)), the πππβs larger than β remain unchanged. The main disadvantage of using hard thresholding is that it has a βjumpyβ nature: as β is increased a predictor that has a full contribution πππ is suddenly set to zero (Tibshirani et al., 2003:111). This typically leads to a procedure with larger variance than one based on soft thresholding.
Returning to the soft threshold NSC procedure, the new shrunken versions of π₯Μ ππ are
calculated by reversing the transformation in (2.4):
π₯Μ ππβ² = π₯Μ
π+ ππ(π π+ π 0)πππβ² .
These shrunken centroids π₯Μ ππβ² are substituted in place of π₯Μ ππ in the discriminant score.
This procedure therefore results in variable selection as only variables with a non-zero πππβ² for at least one of the classes play a role in the classification rule and typically a large
number of variables can be discarded. Therefore, NSC actually implements variable selection and thereby dimension reduction.
As mentioned previously, the discriminant score defined for each data case in NSC is similar to that of diagonal LDA (Tibshirani et al., 2001:6569). Suppose there exists a test data case vector with expression levels πβ = (π₯
1β, π₯2β, β¦ , π₯πβ), then the discriminant score
for class π is defined as
πΏπ(πβ) = β β(π₯π ββ π₯Μ ππβ²)2 (π π+ π 0)2 + 2πππππ. π π=1 (2.6)
The first term in (2.6) standardises the squared distance of πβ to the ππ‘β shrunken centroid. The second term, 2πππππ, makes a correction based on the class prior
probability ππ. Note that βπΊπ=1ππ = 1 and that ππ provides the overall relative frequency
of class π in the population. The prior probability ππ is typically estimated by the sample prior πΜπ =πππ; however, if the sample prior is not representative of the population then
more realistic or equal priors can be used, i.e. ππ =πΊ1 (Tibshirani et al., 2001:6569).
Tibshirani et al. (2001:6569) explain that βif the smallest distances are close and hence ambiguous, the prior correction in (2.6) gives a preference for larger classes, because they potentially account for more errors.β
The NSC classification rule is then
πΆ(πβ) = β if πΏ
π(πβ) = πππ₯ππΏπ(πβ).
Estimates of the class probabilities, analogous to Gaussian linear discriminant analysis, can be constructed using the discriminant scores in (2.6):