<<

540 MONTHLY WEATHER REVIEW VOLUME 129

Euclidean Distance as a Similarity Metric for Principal Component Analysis

KIMBERLY L. ELMORE* NOAA/National Severe Storms Laboratory, Norman, Oklahoma

MICHAEL B. RICHMAN School of Meteorology and Cooperative Institute for Mesoscale Meteorological Studies, University of Oklahoma, Norman, Oklahoma

(Manuscript received 24 February 2000, in ®nal form 5 September 2000)

ABSTRACT Eigentechniques, in particular principal component analysis (PCA), have been widely used in meteorological analyses since the early 1950s. Traditionally, choices for the parent similarity , which are diagonalized, have been limited to correlation, covariance, or, rarely, cross products. Whereas each matrix has unique char- acteristic bene®ts, all essentially identify parameters that vary together. Depending on what underlying structure the analyst wishes to reveal, similarity matrices can be employed, other than the aforementioned, to yield different results. In this work, a similarity matrix based upon Euclidean distance, commonly used in cluster analysis, is developed as a viable alternative. For PCA, Euclidean distance is converted into Euclidean similarity. Unlike the variance-based similarity matrices, a PCA performed using Euclidean similarity identi®es parameters that are close to each other in a Euclidean distance sense. Rather than identifying parameters that change together, the resulting Euclidean similarity±based PCA identi®es parameters that are close to each other, thereby providing a new similarity matrix choice. The concept used to create Euclidean similarity extends the utility of PCA by opening a wide range of similarity measures available to investigators, to be chosen based on what characteristic they wish to identify.

1. Introduction trix, or, rarely, a matrix of cross products. These simi- larity matrices are diagonalized such that eigenvalues Eigentechniques have been widely used in meteorol- and associated eigenvectors are identi®ed and eventually ogy since the 1950s. Three common variants are com- used in the physical interpretation phase of the analysis. mon factor analysis (CFA; Thurstone 1947), empirical Because the parent similarity matrix embodies the type orthogonal functions (EOF; Lorenz 1956), and principal of association desired, and de®nes the immediate start- component analysis (PCA; Hotelling 1933). EOF uses ing point for the eigenanalysis by virtue of being di- unit-length eigenvectors, whereas in PCA and CFA each agonalized, the similarity measure used to build the par- eigenvector is weighted by the square root of its cor- ent similarity matrix is an important aspect of any ei- responding eigenvalue. Consequently, the weights rep- gentechnique. However, this choice is not always given resent the correlations or covariances between each var- the consideration it is due. Historically, the various sim- iable and each principal component, depending upon ilarity matrices have been discussed and compared in which similarity matrix is employed (Jolliffe 1995). Any meteorological literature. Examples include Craddock of the three techniques may be used as either a statistical (1965), Kutzbach (1967, 1969), and Craddock and modeling tool or as a diagnostic tool. Each eigentech- Flood (1969), who all favor the on nique is derived directly from a parent similarity matrix grounds that it more accurately portrays the true vari- (also called a dispersion matrix in some texts) that typ- ance structure. In contrast, Gilman (1957), Sellers ically consists of either a correlation or covariance ma- (1957) and Glahn (1965) are proponents of the corre- lation matrix, claiming it puts all variables on equal footing, whereas Resio and Hayden (1975) and Molteni * Additional af®liation: Cooperative Institute for Mesoscale Me- et al. (1983) ®nd cross products to have utility. teorological Studies, University of Oklahoma, Norman, Oklahoma. Depending upon the parent similarity matrix, eigen- technique results can have physically different mean- Corresponding author address: Kimberly L. Elmore, National Se- ings. Table 1 de®nes cross products, covariance, and vere Storms Laboratory, 1313 Halley Circle, Norman, OK 73069. correlation for both single column data vectors of length E-mail: [email protected] n and n ϫ p data matrices. The correlation matrix groups

᭧ 2001 American Meteorological Society

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC MARCH 2001 ELMORE AND RICHMAN 541

TABLE 1. Vector and matrix forms for cross products, variance/covariance, and correlation. For the vector form, n is the length of the vector andxy ( ) is the vector whose values consist of the mean of x(y). In the vector form of correlation, sx(sy) is the square root of variance for the x(y) vector. For the matrix form, the X is n ϫ p (n rows and p columns), and M (also n ϫ p) is the matrix whose ith column is the mean of the ith column of X. V is a p ϫ p whose p non-zero elements consist of the variance of each column of X. Similarity measure Vector form Matrix form Cross products p ϭ xyT P ϭ XXT (x Ϫ x)(T y Ϫ y) (X Ϫ M)(T X Ϫ M) Variance/covariance s ϭ S ϭ (n Ϫ 1) (n Ϫ 1) T (x Ϫ x)(y Ϫ y) [(X Ϫ M)͙V Ϫ1T][(X Ϫ M)͙V Ϫ1] ss Correlation [][]xy R ϭ r ϭ (n Ϫ 1) (n Ϫ 1) variables together regardless of the amplitude of their analyses using a single parameter whose variables (e.g., variation or mean. By its nature, correlation provides time series at an array of grid points) have a large range no measure of how much parameters vary with each over the domain will emphasize those locations with a other, only that they do. For example, correlation does large variance. For example, an eigenanalysis based on not address whether the magnitude of variation in one a covariance matrix of Northern Hemisphere sea level variable coincides with the magnitude of variation in pressure will emphasize those geographic locations that another. Correlation addresses only relative variability exhibit large variance (midlatitudes) and de-emphasize relationship because the standardization puts all vari- those geographic locations with small variance (tropical ances equal to unity. Often, such a relation is the most regions). important aspect of an analysis. Because input data have A cross products (covariance without removing the been normalized to a zero mean and unit variance, cor- means) similarity matrix also preserves units, and results relation is a dimensionless similarity metric; hence, it are sensitive to the magnitudes of the means as well as is appropriate for comparing variables with different coassociation. A data vector that possesses a mean with units or scales. large magnitude will dominate the eigenanalysis out- The covariance matrix yields insight into how much come. When the magnitudes of the means are similar, variables change with respect to each other. Data that the eigenanalysis outcome is primarily determined by are transformed into a covariance matrix have been the covariance. Additionally, analyses utilizing the cross translated to zero mean. Strictly speaking, dimensions products similarity matrix tend to have a ®rst principal or scales are preserved with covariance, which means component that resembles the mean. that applications that mix different units will emphasize For these three similarity matrices, coassociation those with units having the most variation. Moreover, plays an important role because the eigenanalysis, in some manner, identi®es variables that change together. The PCA process may be summed up with a schematic diagram (Fig. 1). The similarity transformation step may be thought of as a kind of ®lter that determines the nature of any physical insights available form the data. Singular value decomposition (SVD) can be used to make the similarity transformation stage implicit. Nonetheless, the original data are still altered (e.g., standardized, have the mean removed, etc.), which is equivalent to the idea of a ®lter. In the past, the eigenanalysis step has received con- siderable attention. Examples include using different ei- gentechniques (scalings), keeping different numbers of dimensions, various rotations, etc. Attention to the ei- genanalysis has led to signi®cant improvements in being able to match the similarity matrix well to the principal component (PC) loading vectors. Much less attention has been given to the similarity matrix step. Before now, the idea of using this step to tune an analysis was rarely FIG. 1. Schematic PCA process. The process starts with the original considered, since the choices were usually limited to data, which are then converted to a similarity matrix (shaded box). An eigenanalysis is performed on the similarity matrix and the results two: correlation or covariance. But might physical in- of the eigenanalysis interpreted by the analyst. The eigenanalysis sight arise from another characteristic besides coasso- results are signi®cantly constrained by the similarity matrix step. ciation?

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC 542 MONTHLY WEATHER REVIEW VOLUME 129

TABLE 2. Alternative distance measures. Distance Form

T Ϫ1 dx,y ϭ (x Ϫ y) ⌺ (x Ϫ y), Mahalanobis distance where ⌺ is any transforming positive semide®nite matrix (most com- monly, S)

␭ 1/␭ Minkowski between two vectors (also called the L␭ norm) dx,y ϭ {|x Ϫ y|} ,␭ Ն 1 |x Ϫ y| Canberra metric d ϭ x,y (x ϩ y)

1/2 p Bhattacharyya distance (proportions) d ϭ (x1/2Ϫ y 1/2) 2 x,y ͸ ii []iϭ1

Clearly, the investigator must carefully consider what el runs, each started with slightly different initial con- is desired from an eigenanalysis and choose an appro- ditions. Other time series can also be treated this way, priate parent similarity matrix that preserves the desired such as precipitation, or the u and v wind components. information. It is possible that coassociation of the Of course, extracting modes need not be limited to time aforementioned types is not an important issue. For ex- series. For example, two-dimensional ®elds, such as ample, objective identi®cation and representation of var- spatial pressure or height patterns can be treated in an iables that, when plotted together, are coassociated in identical fashion. that they appear visually close to one another may be In this case, the parameter to be examined is arranged important. A desirable result is to distill the data into a in a data matrix that provides an S-mode analysis (Rich- few, easily interpreted modes of behavior. To accom- man 1986), in which each column (variable) represents plish this result, a new similarity matrix, named Eu- a time series vector. If the data are arranged such that clidean similarity (ES), is utilized. Euclidean similarity each column consists of values at a single time, dis- is inspired by the large body of literature on cluster tributed in space, the analysis is T mode. Because the analysis, which clearly demonstrates the effectiveness goal is to produce a small number or easily understood of Euclidean distance (ED), on which ES is based. How- forecast modes, the modes must be visualized (Anderson ever, standard cluster analysis creates ``hard'' clusters. 1996). The ED (or the Minkowski L2 norm) provides This means that each data vector must be in one cluster a way to extract the desired modes. Cluster analysis uses or another. A PCA based on ES tends to create ``fuzzy'' ED extensively to identify or group data or entities that clusters, which means that parts of each data vector will are dissimilar (Anderberg 1973; Gong and Richman appear in each recovered mode. Also, retaining enough 1994). Euclidean distance is an attractive measure for PCs to explain a given amount of similarity provides identifying modes because whether the parameter com- an objective criterion that determines the number of prising the individual vectors vary together is not as modes. Cluster analysis provides no equivalent objec- important as how closely they overlie each other. tive criteria for de®ning how many clusters are enough. Any of the Minkowski norms could be used as a

Euclidean distance is one of a host of different dis- dissimilarity measure. The L2 norm is particularly at- tance measures that could be used. Euclidean distance tractive because 1) it has a very intuitive interpretation is chosen primarily because its interpretation is straight- through the geometry of Euclid, and 2) the norm be- forward. Other distances are given in Table 2 (Mardia haves linearly. Least squares ®ts are a linear problem et al. 1979). These distances are typically de®ned as because variance, which may be thought of as a an L2 between rows of the data matrix. To apply them in a norm, is used as the measure of error. PCA sense, they must be considered as between col- Consider a p ϫ n data matrix Z composed of n col- umns of the data matrix. umns (cases), each p elements long. The ED between

The next section introduces and de®nes ES. Section the vectors zi and zj is 3 demonstrates how modes of coassociation are extract- d [(z z )T(z z )]1/2, (1) ed with a PCA based on ES. Section 4 demonstrates ij ϭ i Ϫ j i Ϫ j results of PCA using ES in both S-mode and T-mode where dij is the distance between the vectors zi and zj. analyses, and these results summarized in section 5. When computed for all i, j, and arranged in a matrix in an order identical to that obtained from matrix cross 2. Euclidean similarity products, this process results in a symmetric dissimi- larity matrix of Euclidean distances, D. For n cases, D As a motivational example, ES is used to extract ver- will be n ϫ n. This matrix has zeros along the main or tical velocity (w) time series that exhibit similar behav- principal diagonal (because the distance between a vec- ior and combine them into modes. In this example, the tor and itself is zero) and has units identical to the input ensemble of w time series come from several cloud mod- data. The difference between dissimilarity and similarity

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC MARCH 2001 ELMORE AND RICHMAN 543 is orientation, so for a Euclidean dissimilarity metric, sible (in a Euclidean distance sense) because they cannot large values indicate a large Euclidean distance, whereas be remapped to new orthogonal components that will for a Euclidean similarity metric, large values indicate result in a coordinate transformation that further sepa- a small Euclidean distance. To create a similarity matrix, rates them. This is quite different from, say, a variance/ some simple operations must be applied to D. covariance-based PCA, where the data may be recast

De®ne dmax to be the maximum of all elements in D. onto orthogonal coordinates such that the ®rst loading Normalize D by dmax such that no element in the new (scaled eigenvector) represents the coordinate axis that Dà is greater than 1 by setting explains the most variance, and the second loading de- ®nes the axis that explains the rest of the variance. Dà ϭ (1/d )D, (2) max However, there are consequences inherent in Euclid- Let Q be the n ϫ n matrix for which all elements are ean similarity. For example, ®nding distinctions based 1 and use it to de®ne a new similarity matrix, E, such on Euclidean distance may not always provide a mean- that ingful result. In the example above, let the data vectors consist of x ϭ (0, 1)T and x ϭ (0.01, 1)T. In a Euclidean E Q Dà . (3) 1 2 ϭ Ϫ distance sense, these two vectors are distinct, because These operations transform D into a matrix of similar- the Euclidean distance between them is nonzero, while ities, where the main or principal diagonal consists of a graphical analysis yields no signi®cant distinction. ones. Hence, E mimics a correlation matrix. Euclidean This is because of the arbitrary decision to scale the similarity is dimensionless and, because ES is con- matrix D by dmax. This guarantees a distinction structed to mimic correlation, an eigenanalysis pre- between the two vectors, even when that distinction may serves relative distances between data vectors. be due to noise or measurement error. These conse- The PCA performed on ES creates a columnwise or- quences may not be a practical problem with moderate thogonal loading matrix, though the loading vectors may to large numbers of observations, but, as with any other be correlated. The Euclidean distance between the load- similarity metric, Euclidean similarity should not be ap- ing vectors is the primary structure imposed by the ei- plied blindly. genanalysis. Let the columns of the loadings matrix A be de®ned as a , a , ..., a . The Euclidean distance 1 2 n 3. Euclidean similarity PCA using least squares between a and a is the largest of any pair of PC load- 1 2 scores ings. The Euclidean distance between a1 and a3 is the next largest, and so on to the distance between a1 and The breadth of solutions and interpretations that can an. The next largest distance between any two loadings result from a single dataset, based on different similarity is that between a 2 and a3, then that between a3 and a 4, measures, is brie¯y reviewed prior to the demonstration and so on. The smallest distance between loadings is of pattern retrieval using scores derived from ES. This that between anϪ1 and an. is intended to help emphasize the point that the inves- An example that uses only two data vectors is pre- tigator needs to deliberately address the question, a sented as a simple introduction. Let the Euclidean dis- priori, of what is truly desired from the analysis. ``Black tance between these two vectors be de®ned as d. Thus, box'' approaches, which mean the blind application of the matrix of Euclidean distances is a given similarity matrix, may not lead to useful results. Moreover, such an approach may deprive the investi- 0 d gator of new insights. D ϭ . []d 0 Typically, the fundamental PCA equation is cast as Z ϭ FAT, (4) Because dmax ϭ d, the matrix of normalized Euclidean à distance, D is where Z is the (p ϫ n) data matrix, and, in the nomen- clature of PCA, A is the (n ϫ n) matrix of loadings, 01 Dà ϭ . and F is the (p ϫ n) matrix of scores. In PCA, the []10 eigenvectors (V) are scaled by the square root of their 1/2 Finally, this new matrix is converted to ES by ele- respective eigenvalues (⌳ ), which yields the matrix mentwise subtracting it from Q: of loadings (A). Despite the fundamental formula, the traditional manner in which V is derived is through di- 11 01 10 agonalization of a similarity matrix, E,as E ϭϪϭ. [][][]11 10 01 E ϭ V⌳VT. (5)

The similarity matrix, E, is the 2 ϫ 2 Any PC loading vector, aj, can have all of its elements in this example. A PCA on this matrix is trivial because, multiplied by Ϫ1, because the signs of the loadings are by inspection, the eigenvalues are ␭1 ϭ ␭ 2 ϭ 1 and arbitrary. These loadings may be considered weights eigenvectors are v1 ϭ [0 1], v 2 ϭ [1 0]. This result that identify linear combinations of the scores that, as shows that any two data vectors are as distinct as pos- de®ned in the parent similarity matrix, behave similarly.

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC 544 MONTHLY WEATHER REVIEW VOLUME 129

Geometrically, the PCs de®ne a new, orthogonal co- out of an ensemble of many cloud model runs. Varimax ordinate system into which the loadings are projected. is an orthogonal , which means that the original If all of the eigenvectors are retained, the original data loading matrix, A, is transformed via an orthogonal (and thus its total similarity) can be recovered exactly, transformation matrix to the rotated loading matrix, B. although the original data may be standardized for cer- Mathematically, tain analyses. If all are not retained, the original data B ϭ AT, (6) (and its total similarity) can be recovered only approx- imately, yet the PC model yields the most ef®cient man- where T is an such that ner in which data can be expressed in a smaller number TTT ϭ I, (7) of dimensions. The maximum variance and constraints and I is the identity matrix. The varimax method ®nds that act on a spatial or temporal domain can lead to a T by iteratively maximizing the collective variance of number of hindrances to physical interpretation of un- the squared loadings for all the retained PCs. rotated PC loadings (Richman 1986). These hindrances Unlike typical PCA, where most of the physical include merging of unique sources of variation on the interpretation is applied to the loadings, for this appli- leading PC (Karl and Koscielny 1982), high sampling cation physical interpretability arises from the scores (F) errors if adjacent eigenvalues are similar (North et al. recovered from the rotated loadings and original data. 1982), a set of predictable geometric patterns that are Recovery of modes from a small number of dimensions, partly a function of domain shape (Buell 1975), and r Ͻ n, uses a crucial PCA characteristic: PCA provides poor ®t to the parent similarity matrix (Richman and variables in the order necessary to allow linear least Gong 1999). Hence, the PC loading patterns may not squares reconstruction of the data using the fewest pos- optimally portray physical relationships embedded in sible terms. Modes are extracted through a least squares the data. In fact, these patterns can be misleading if they formulation, because it is straightforward and optimal in are literally interpreted as the key modes of variation an L2 sense. Least squares scores are de®ned by in the parent similarity matrix. Because the ability to F ϭ ZB(BTB)Ϫ1, (8) portray physical relationships accurately is crucial to identifying modes of behavior in a PCA, coordinate where Z is the original p ϫ n matrix of w values. This transformations, called rotations, are often applied to yields r modes because, if Z is p ϫ n and B is n ϫ r, the PCs. Once rotation is invoked, some of the char- where r is the number of retained PCs, then (BTB)Ϫ1 is acteristics of the loading and score matrices (in partic- r ϫ r, F is p ϫ r, which leaves r column vectors in the ular, orthogonality) no longer apply (Jolliffe 1995). Ap- result, where each column vector represents a mode. propriate rotation does, however, enhance interpretabil- The matrix represented by B(BTB)Ϫ1 is the n ϫ r matrix ity, though rotation does not guarantee interpretability of least squares weights. The PCA model is closed be- (Richman 1986; Cheng et al. 1995). How many (r, cause, for all cases, Z Ϫ FAT ϭ 0. This relationship where r Ͻ n) PCs to retain for rotation is a somewhat holds for both unrotated and rotated loadings, ensuring subjective decision, and can be determined in numerous model closure. Note that the sign of the recovered scores ways, for example, by variance criteria, eigenvalue sep- is arbitrary, dependent upon the arbitrary sign of the aration criteria, etc. In principle, the majority of the loadings. As such, all scores have been arbitrarily de- signal is captured in the ®rst r PCs, and noise, which ®ned to start with positive values. is contained in the r ϩ 1,...,n PCs, is discarded. For Another characteristic of any similarity metric, in- the examples here, enough PCs to explain at least 80% cluding ES, is that the resultant modes do not retain the of the total ES are retained. original amplitude of the data from which they are de- To aid in obtaining physically interpretable results, a rived. This arises because the data needed to do so fully varimax (Kaiser 1958) rotation is applied. The varimax are distributed in all PCs, including those that have been rotation criterion is the most widely accepted and em- discarded, r ϩ 1, r ϩ 2,...,n (or, alternatively, dis- ployed orthogonal rotation, because it tends to produce, tributed into other, unused dimensions of the eigenspa- but does not guarantee, simpli®cation of the unrotated ce). If PCA is cast in a signal analysis paradigm, because loadings into easier to interpret results (Cooley and Loh- some PCs (data) are discarded, some signal is discarded nes 1971). The varimax rotation is useful only because as well. The few retained components cannot recreate it relates well to the qualities contained in the parent the total similarity contained in the original signal (the similarity matrix. The varimax method itself has no in- full dataset). trinsic physical . A varimax rotation simpli®es the Euclidean distance is often used in multidimensional loadings by rigidly rotating the PC axes such that the scaling (MDS). MDS takes a set of dissimilarities, such variable projection (loadings) on each PC tend to be as the matrix, D, of Euclidean distances between data high or low (Cooley and Lohnes 1971), which is con- vectors, and returns a set of points (typically in two sistent with the physics needed for the de®nition of a dimensions, ᑬ2) such that the distances between the small set of convective modes. These modes are used points are approximately equal to the dissimilarities. to describe the dominant behavior of convective storms This is often accomplished by applying PCA techniques

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC MARCH 2001 ELMORE AND RICHMAN 545

FIG. 2. Vertical velocity time series from nine cloud model runs. FIG. 3. The ®rst three least squares modes for a correlation-based Values represent the largest positive vertical velocity anywhere in the S-mode analysis of the vertical velocities in Fig. 2. The x axis is time model domain, over a period of 92 min. The x axis is time and the and the y axis is centered, scaled vertical velocity. The solid line y axis is vertical velocity in m sϪ1. Dashed line shows the threshold shows the zero reference. for cell lifetime de®nition.

be based upon the apparent ``closeness'' of the time directly to the dissimilarity matrix. Hence, in MDS, each series to each other. Consequently, a group of time series data vector could be represented by a point in ᑬ 2. Data that overlie each other or, put visually, that overlap or vectors that are similar to each other will appear close form an obvious grouping, are linearly combined to together, while data vectors that are most dissimilar form a single time series that represents a collection of would be well separated. However, as in cluster analysis, similar time series. Accordingly, a cloud of w time series the actual shape of the similar data vectors is not rep- that last for the entire 90 min, and have similar ampli- resented. In a PCA based on ES, a small set of vectors tude, are linearly combined into a single mode, where is constructed from the original, larger set, based on a mode is subjectively de®ned as a frequently occurring weighted combination of points that would appear close subset of the original data. to each other in an MDS analysis. Based on the above subjective de®nition of a mode, three modes should result from the PCA. Reasonable a 4. Examples priori expectations are that one mode should have a large amplitude that lasts for the entire length of the data PCA may be based upon various similarity matrices. series (92 min). This mode results from the similarity The chosen similarity matrix signi®cantly affects the between runs 2, 4, 5, 7, and 8. A second mode, that appearance of the resulting least squares scores. Ex- lasts about two-thirds of the available data series length, amples of PCA that use correlation, covariance, cross and with an amplitude close to the ®rst mode, might products, and ES are developed and shown for the w also be reasonably expected. This second mode is driven time series. An example is also shown for a two-di- primarily by the similarity between runs 1 and 6. A mensional station pressure ®eld. The pressure ®eld ex- third mode that has a low amplitude and a brief duration, ample uses correlation and ES to demonstrate that a is also expected. The third mode will be driven primarily PCA based upon an ES parent matrix will extract a by the similarity between runs 3 and 9. pattern known to exist within the data, but that a PCA Least squares scores that are recovered from a rotated based on a correlation matrix extracts different patterns correlation-based PCA do not result in elements that that must be interpreted differently. can be physically interpreted as a vertical velocity time The example that motivates this work uses a time series (Fig. 3). This is because these scores represent series of the maximum w within the spatial domain for the centered (to zero mean) and scaled (to unit variance) an ensemble of individual cloud model runs, each started uncorrelated vertical velocity modes. Given the nature with slightly different initial soundings. For these time of the modes that are desired, scores based on correlated series, w is available every 1.05 min and it is possible, behavior are not the desired result. Unfortunately, these at least for the sample case, to determine subjectively scores provide no way to scale cell lifetime. Neither do what the dominant modes are by visual inspection (Fig. these scores provide any way to extract information 2). For example, let cell lifetime be de®ned as that pe- about the intensity of convective activity. Similar, riod for which vertical velocity is at least 10 m sϪ1. though not identical, results are obtained from the co- Subjectively, it is desired that all of the extracted modes variance similarity matrix (Fig. 4). Again, these are the

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC 546 MONTHLY WEATHER REVIEW VOLUME 129

FIG. 4. Same as Fig. 3, but for a covariance-based analysis. Here, FIG. 5. Same as Fig. 3, but for a cross products analysis. Here, the y the y axis is centered vertical velocity, in m sϪ1. Solid line shows the axis is vertical velocity in m sϪ1. Solid line shows the zero reference. zero reference. centered, uncorrelated vertical velocity scores. Certain characterize the lifetime of each mode. This behavior segments appear similar to the original data (which is is not signi®cantly affected by the amplitude of the mode expected), but how these scores relate to updraft inten- and is used to de®ne the cell lifetime. sity or cell lifetime is not clear. Cell lifetime could also be de®ned as for cross prod- Least squares score recovery with cross products have ucts, where the ®rst large negative deviation signals the some characteristics similar to the a priori expectations end of the storm. For this example, using either a 5 m Ϫ1 (Fig. 5). Unfortunately, nothing that resembles vertical s threshold or the ®rst large negative deviation results velocity magnitudes are preserved within the scores. in equivalent cell lifetime estimates. Cell lifetimes can be de®ned as the point in time where In any eigenanalysis, the stability of the eigenvalues the score magnitude rapidly decreases. Using this rule, is an important consideration. To directly test the sta- mode 1 lasts the entire 92 min, which is an expected bility of these least squares Euclidean similarity modes, lifetime mode. Mode 2 length could be either 59 or 72 Gaussian noise, with a mean of 0 and a standard de- Ϫ1 min, depending upon whether the ®rst sharp, but small, viation of 2 m s , is added to the original data. This decrease or the second, larger decrease is used. Mode process is repeated 1000 times, and the resulting modes 3 could also be either 14 or 23 min. However, infor- are recovered. Then, the 2.5th and 97.5th percentiles are mation about relative updraft intensity is unavailable, which, along with cell lifetime, might be an important indicator of storm characteristics. Least squares scores that result from ES meet the requirements of preserving both cell lifetime and rela- tive vertical velocity magnitude information (Fig. 6). Mode 1 is clearly a large-magnitude convective mode that lasts the entire 92 min. In this case, mode 2 is the short-lived, low-magnitude mode. Mode 3 lasts about 60 min and has a high amplitude. As for cross products, cell lifetimes can be de®ned in various ways. Note that, because the least squares ES modes do not preserve the mean, the cell lifetime de®nition using a w time series can become problematic because the original threshold of 10 m sϪ1 may no longer be representative. Hence, cell lifetime is de®ned as that period when the least squares vertical velocity score is at least 5 m sϪ1. For- tunately, when applied to these w time series, another inherent characteristic of ES based on rotated PCs is FIG. 6. Same as Fig. 3, but for an ES-based analysis. Here, the y axis is vertical velocity in m sϪ1. Solid line shows the zero reference. that each mode displays either a sign change or rapidly Dashed line representsa5msϪ1 threshold for cell lifetime de®nition, decreases toward zero at some point. Either the sign which is necessary because the full amplitude of the original data is change or the rapid decrease toward zero suf®ces to not retained. See text for further details.

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC MARCH 2001 ELMORE AND RICHMAN 547

appropriate band (Fig. 7). Therefore, ES modes are sta- ble with respect to white noise contamination. A second example uses a familiar meteorological pa- rameter: surface station pressure. For this example, the data comes from the Oklahoma mesonet (Brock et al. 1995). The data matrix consists of station pressures tak- en at 1-h intervals for the entire month of October 1994, one column for each hour, which makes this a T-mode analysis. Because the data are station pressures, the overwhelming signal or pattern is driven by surface el- evation (Fig. 8). Hence, the expected corresponding pressure mode should resemble closely the pattern of station elevations or, alternatively, the mean station pressure. However, an ES-based PCA does not consti- tute a climatology of surface pressure. An ES-based PCA provides information about the most common pat- tern in the pressure ®eld. FIG. 7. As in Fig. 6, but showing the band de®ned by the 2.5 and A PCA is performed using an ES matrix and a cor- 97.5 percentiles for each mode based upon adding Gaussian noise to the original data. relation matrix to provide a contrast. Two PCs are re- tained from the ES analysis, which explain 87% of the total ES. Alternatively, three PCs are retained from the computed, which creates a range of modal values at each correlation analysis, which explain 83% or the total var- point, a process reminiscent of creating 95% con®dence iance. The retained PCs are rotated using the varimax limits. If each of the original ES modes falls within the rotation algorithm. The least squares scores, which con- appropriate band, then the PCA based on ES is stable. stitute modes, are recovered using Eq. (8). All three three of the original ES modes fall within the The different least squares modes are not the same,

FIG. 8. Oklahoma mesonet data as input to both a PCA based on ES and a PCA based on correlation. Input data consists of hourly station pressures for Oct 1994. Dots show individual mesonet station locations. (a) Oklahoma mesonet station elevation in m; (b) mean pressure, in hPa, over the Oklahoma mesonet for Oct 1994; (c) the ®rst modal pressure, in hPa, resulting from a PCA based on ES; (d) the ®rst modal pressure resulting from a PCA based on correlation. The ®eld in (d) is pressure normalized to a mean of zero and unit variance, and is thus dimensionless.

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC 548 MONTHLY WEATHER REVIEW VOLUME 129 nor should they be. The different least squares modes cross products analysis will preserve gradients in the that are available demonstrate the breadth of solutions mean, while an ES-based analysis will preserve gradi- possible from the same base dataset, dependent only ents in the Euclidean distance between each data series. upon the similarity matrix that is employed. The pres- Many meteorological data ®elds are distributed in sures that result from the PCA based on ES do not equal both time and space, for example, pressure, rainfall, and the station pressures because the total pressure similarity temperature. For single-dimensional and multidimen- has been distributed to n (where n ϭ 744 in this ex- sional problems embedded in such ®elds, our investi- ample) dimensions, and r (where r ϭ 1) dimensions gation illustrates that when a similarity matrix based have been retained. Despite this, the contour pattern upon Euclidean distance (ED) is constructed, the re- formed by the ®rst ES mode is strikingly similar to both sulting PCs can lead to unique insights. Furthermore, the pattern of average station pressure and the pattern these insights are consistent with physical factors known of station elevation. The values resulting from the PCA to control the behavior of spatial gradients in these based on correlation cannot be interpreted as pressure, ®elds. because each mode is normalized to a mean of zero and In the PCA development presented here, rotated PC unit variance. The contour pattern formed by the ®rst loadings and the resulting scores are used to recover correlation mode shows a general gradient of normal- these structures or coassociations, called modes. By ap- ized pressure from northwest to southeast, but the lowest plying the ED-based similarity matrix to data ®elds that normalized pressure appears in northwestern Oklahoma, have known modes of behavior, the results are shown when in reality the lowest station pressure should be in to be reasonable. As contrasting examples, PCA scores the western Oklahoma panhandle. Overall, the corre- that result from the correlation matrix, the covariance lation mode lacks the detail in the morphology and gra- matrix, and cross products matrix are also depicted and dient of the isopleths contained in the ES mode. Based discussed. The ED-based results are also demonstrated on the two examples provided, it is clear that a PCA to be valid for both S-mode and T-mode analyses. based on ES can recover both one-dimensional and two- Hence, a PCA based on ED can recover both one- and dimensional modes that are contained in the input data. two-dimensional scores. Another, useful characteristic Additionally, the recovered modes are easily interpreted of the modes that result from an ED-based PCA is that in units that are native to the original input data. Because they tend to preserve physically interpretable gradients gradients, and their interpretation, are an important part (both the gradient and the direction of the gradient) of meteorological analyses, an ES alternative to the of- within the original data ®elds. ten-used correlation and covariance similarity matrices This technique is intended to illustrate both the utility appears to have broad utility. and ¯exibility of eigenanalysis. The breadth of solutions available depends to a large extent upon the similarity matrix that is employed. Therefore, investigators should 5. Discussion and conclusions not feel eigenanalysis is necessarily constrained by two Eigentechniques, such as PCA, are important, and or perhaps three popular similarity matrices, nor should commonly applied, tools for meteorological analysis. the analysis step of choosing a similarity matrix be taken When PCA is performed appropriately it can lead to lightly. Instead, the large number of similarity matrices physical insight and understanding of large amounts of that are available, such as Mahalanobis distance, sim- data. Traditionally, PCA has been applied to a parent ilarity based on the L1 distance, and theta angle between similarity matrix based on either correlation, covariance, entities (Anderberg 1973), must be considered. Hence, or, occasionally, cross products. This paper shows that the choice of a similarity matrix is limited only by the the speci®c choice of the similarity matrix used to re- desired output and the analyst's insight into the best cover the PC loadings and scores can profoundly affect procedure to maximize the underlying physics that can the results. Unfortunately, there is no recipe for appro- emerge from a PCA. priately choosing a similarity coef®cient. Such a recipe However, care must be exercised when alternative runs counter to judicious consideration of the physical similarity metrics are formulated. For example, the tar- insights sought by the analyst and how the insight is get interval for the similarity metric presented here is affected by the choice of various similarity measures. [0, 1]. The original ED must be transformed linearly to For example, if the interpretation of the physical pro- this interval, so that they are not, for example, forced cesses contained in the data are not negatively impacted to become all either unity or near zero, which effectively by removal of the mean and standard deviation, then compresses all the information into a small interval near correlation may be an appropriate similarity choice. If zero. Such a transformation results in a similarity matrix removing the standard deviation negatively impacts the that is nearly the identity matrix, and hence eigenvalues interpretation of the physical processes that need to be that are all nearly equal. The PCs resulting from such revealed, but removing the mean does not, then co- a matrix will be unstable and degenerate (North et al. variance may be an appropriate similarity metric. If re- 1982). As a bonus to developing a new similarity metric, moving the mean is counterproductive, then either a such investigations constitute an opportunity to expand cross products or ES analysis should be investigated. A upon eigenanalysis as a diagnostic tool.

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC MARCH 2001 ELMORE AND RICHMAN 549

Acknowledgments. We wish to thank the National Se- day forecasting. Sci. Rep. 1, Dept. of Meteorology, MIT, Cam- vere Storms Laboratory and the Cooperative Institute bridge, MA, Contract AF19(604)-1283. Glahn, H. R., 1965: Objective weather forecasting by statistical meth- for Mesoscale Meteorological Studies, who have made ods. The Statistician, 15, 111±142. it possible to pursue this research, and Drs. David Stens- Gong, X., and M. B. Richman, 1994: On the application of cluster rud and Charles Doswell III for their insightful com- analysis to growing season precipitation data in North America ments. We also wish to thank three anonymous review- east of the Rockies. J. Climate, 8, 897±931. ers whose comments and questions helped signi®cantly Harman, H. H., 1976: Modern Factor Analysis. The University of Chicago Press, 487 pp. improve the manuscript. In particular, one reviewer sug- Hotelling, H., 1933: Analysis of a complex of statistical variables gested an alternative form of Euclidean similarity. Ex- into principal components. J. Educ. Psychol., 24, 417±520. ploring this suggestion helped us to better describe what Jolliffe, I. T., 1995: Rotation of principal components: Choice of desirable qualities a similarity matrix should possess. normalization constraints. J. Appl. , 22, 29±35. Kaiser, H. F., 1958: The Varimax criterion for analytic rotation in This same reviewer also provided an important insight factor analysis. Psychometrika, 23, 187±200. about how ES could be misused. Some of the ®rst au- Karl, T. R., and A. J. Koscielny, 1982: Drought in the United States: thor's time was supported by a grant from the U.S. 1895±1981. J. Climatol., 2, 313±329. Weather Research Program of the National Atmospheric Kutzbach, J. E., 1967: Empirical eigenvectors and sea-level pressure, and Oceanic Administration. Some of the second au- surface temperature, and precipitation complexes over North America. J. Appl. Meteor., 6, 791±802. thor's time was supported by the NOAA Of®ce of Glob- , 1969: Large-scale features of monthly mean Northern Hemi- al Programs Cooperative Agreement NA67RJ0150. sphere anomaly maps of sea-level pressure. Mon. Wea. Rev., 98, 708±716. Lorenz, E. N., 1956: Empirical orthogonal functions and statistical REFERENCES weather prediction. Scienti®c Rep. 1, Statistical Forecasting Pro- ject, Dept. of Meteorology, MIT, Cambridge, MA, 49 pp. [NTIS Anderberg, M. R., 1973: Cluster Analysis for Applications. Academic AD 110268.] Press, 359 pp. Mardia, K. V., J. T. Kent, and J. M. Bibby, 1979: Multivariate Anal- Anderson, J. L., 1996: A method for producing and evaluating prob- ysis. Academic Press, 521 pp. abilistic forecasts from ensemble model integrations. J. Climate, Molteni, F., P. Bonelli, and P. Bacci, 1983: Precipitation over northern 9, 1518±1530. Italy: A description by means of principal components analysis. Brock, F. W., K. C. Crawford, R. L. Elliot, G. W. Cuperus, S. J. J. Climate Appl. Meteor., 22, 1738±1752. Stadler, H. J. Johnson, and M. D. Eilts, 1995: The Oklahoma North, G. R., T. L. Bell, R. F. Calahan, and F. J. Moeng, 1982: Sam- mesonet: A technical overview. J. Atmos. Oceanic Technol., 12, pling errors in the estimation of empirical orthogonal functions. 5±19. Mon. Wea. Rev., 110, 699±706. Buell, C. E., 1975: The topography of empirical orthogonal functions. Resio, D. T., and B. P. Hayden, 1975: Recent secular variations in Preprints, Fourth Conf. on Probability and Statistics in Atmo- mid-Atlantic winter extratropical storm climate. J. Appl. Meteor., spheric Sciences, Tallahassee, FL, Amer. Meteor. Soc., 188±193. 14, 1223±1234. Cheng, X., G. Nitsche, and J. M. Wallace, 1995: Robustness of low Richman, M. B., 1986: Rotation of principal components. J. Cli- frequency circulation patterns derived from EOF and totaled matology, 6, 293±335. EOF analysis. J. Climate, 8, 1709±1713. , and X. Gong, 1999: Relationships between the de®nition of Cooley, W. W., and P. R. Lohnes, 1971: Multivariate Data Analysis. the hyperplane width in the ®delity of principal component load- John Wiley and Sons, 364 pp. ing patterns. J. Climate, 12, 1557±1576. Craddock, J. M., 1965: A meteorological application of factor anal- Sellers, W. D., 1957: A statistical-dynamic approach to numerical ysis. The Statistician, 15, 143±156. weather prediction. Sci. Rep. 2, Statistical Forecasting Project, , and C. R. Flood, 1969: Eigenvectors for representing the 500- Dept. of Meteorology, MIT, Cambridge, MA, Contract mb geopotential surface over the northern hemisphere. Quart. AF19(604)-1566. J. Roy. Meteor. Soc., 95, 576±593. Thurstone, L. L., 1947: Multiple Factor Analysis. The University of Gilman, D. L., 1957: Empirical orthogonal functions applied to thirty- Chicago Press, 535 pp.

Unauthenticated | Downloaded 10/02/21 12:06 PM UTC