190 likes | 428 Vues
An Alternative Arrangement of Symmetric Datasets for Vertical Clustering Algorithms. Outline. Symmetric datasets and application Problems for n x n symmetric datasets Proposed solutions Performance evaluation Summary. Symmetric Dataset.
E N D
An Alternative Arrangement of Symmetric Datasets for Vertical Clustering Algorithms
Outline • Symmetric datasets and application • Problems for n x n symmetric datasets • Proposed solutions • Performance evaluation • Summary 2
Symmetric Dataset • A symmetric dataset is an n x n dataset that when transposed, is the same (a undirected unipartite graph). • The dataset may record precomputed information such as • pair-wise similarity (of genes?) • pair-wise Euclidian distance (of objects?) which are "edge labels" when viewing the data as a graph. • Examples of algorithms that use symmetric datasets: • clustering Microarray Data based on Density • Shared NN and Vertical Density-based Clustering Algorithms. 3
Symmetric Dataset • Example of a symmetric dataset: • the pre-computed pair-wise similarity of genes: could be, e.g., the Pearson’s correlation coefficient of expression vectors (see http://davidmlane.com/hyperstat/A51911.html or http://en.wikipedia.org/wiki/Correlation#Pearson.27s_product-moment_coefficient ) 4
Pearson's correlation coefficient exampleA commonly used formula is X Y 1 2 2 5 3 6 scalar product L1 or Manhattan vector length squared-L2 (Euclidean) vector length Note: Change Y to 2,4,6 (colinear with X but twice as long): 28 - 24 4 r = ------------------------------ = ------------ = 1 SQRT((14-12)(56-48)) SQRT(16) So what are we measuring here? Angle between vectors? Why not just use Arcos(xoy/|x||y|)? Or just cos of the angle between them which is xoy / (|X| |y|)? Vector Space dimension 5
Pearson's correlation coefficient examplez-score formula A simpler looking formula can be used if the numbers are converted into z scores, where zx is the variable X converted into z scores and zy is the variable Y converted into z scores. The standard normal distribution is a normal distribution with a mean of 0 and a standard deviation of 1. Normal distributions can be transformed to standard normal distributions by the formula:where X is a score from the original normal distribution, μ is the mean of the original normal distribution, and σ is the standard deviation of original normal distribution. The standard normal distribution is called the z distribution. A z score always reflects the number of standard deviations above or below the mean a particular score is. For instance, if a person scored a 70 on a test with a mean of 50 and a standard deviation of 10, then they scored 2 standard deviations above the mean. Converting the test scores to z scores, an X of 70 would be:So, a z score of 2 means the original score was 2 standard deviations above the mean. Note that the z distribution will only be a normal distribution if the original distribution (X) is normal. 6
Problem and Alternative • Problem: When n is large, arranging symmetric datasets into n x n may be impractical (n2 tuples) • Alternative: Organize the symmetric datasets into n’ x m, n’ >> m, instead of n x n • In other words, the cardinality is extended, the dimension is narrowed, but the number of elements remains the same, 2n, as in n x n. 8
Alternative ( ) ( ) ( ) ( ) é ù d O , O d O , O d O , O d O , O L 2 0 0 2 0 1 2 0 2 2 0 n-1 ê ú ( ) ( ) ( ) ( ) d O , O d O , O d O , O d O , O L ê ú 2 1 0 2 1 1 2 1 2 2 1 n-1 ( ) ( ) ( ) ( ) ê ú d O , O d O , O d O , O d O , O L 2 2 0 2 2 1 2 2 2 2 2 n-1 ê ú M M M L M ê ú ( ) ( ) ( ) ( ) ê ú d O , O d O , O d O , O d O , O L ë û 2 n-1 0 2 n-1 1 2 n-1 2 2 n-1 n-1 Algorithm: Determine n’ and m Input: mo Output: n’ and m let mu = md = mo while((n2 mod mu)!=0||(n2 mod md)!=0) mu++ md-- endwhile if(mu - mo)<(mo – md) m = mu else m = md endif n’ = n2 / m
Performance Evaluation • Two datasets: 4,000 and 8,000 objects • It takes 1.71 and 6.91 minutes to compute pair-wise Euclidian distance of 4,000 and 8,000 objects respectively 11
Performance Evaluation Definitions: • Neighbors: • Density: * d2(Oi,Oj) 14
Summary • We have presented an alternative arrangement of symmetric dataset (unipartite undirected graphs) for vertical clustering algorithms and analyzed its performance. • Narrowing the dimension and extending the cardinality of symmetric datasets is useful. • Our study shows that a dimension in the range of 1,000 to 2,000 is a good option for datasets containing 4,000 and 8,000 objects. 17
Appendix (wikipedia on Pearson's Coef.) Pearson's product-moment coefficient Mathematical properties Linear correlations between 1000 pairs of numbers. The data are graphed on the lower left and their correlation coefficients listed on the upper right. Each set of points correlates maximally with itself, as shown on the diagonal (all correlations = +1). The correlation ρX, Y between two random variablesX and Y with expected values μX and μY and standard deviations σX and σY is defined as: Since μX = E(X), σX2 = E(X2) − E2(X) and likewise for Y, also write: The correlation is defined only if both standard deviations are finite and both of them are nonzero. It is a corollary of the Cauchy-Schwarz inequality that the correlation cannot exceed 1 in absolute value. The correlation is 1 in the case of an increasing linear relationship, −1 in the case of a decreasing linear relationship, and some value in between in all other cases, indicating the degree of linear dependence between the variables. The closer the coefficient is to either −1 or 1, the stronger the correlation between the variables. If the variables are independent then the correlation is 0, but the converse is not true because the correlation coefficient detects only linear dependencies between two variables. Here is an example: Suppose the random variable X is uniformly distributed on the interval from −1 to 1, and Y = X2. Then Y is completely determined by X, so that X and Y are dependent, but their correlation is zero; they are uncorrelated. However, in the special case when X and Y are jointly normal, independence is equivalent to uncorrelatedness. A correlation between two variables is diluted in the presence of measurement error around estimators of one or both variables, in which case disattenuation provides a more accurate coefficient. The sample correlation: If we have a series of n measurements of X and Y written as xi and yi where i = 1, 2, ..., n, then the Pearson product-moment correlation coefficient can be used to estimate the correlation of X and Y . The Pearson coefficient is also known as the "sample correlation coefficient". It is especially important if X and Y are both normally distributed. The Pearson correlation coefficient is then the best estimate of the correlation of X and Y . The Pearson correlation coefficient is written: where and are the sample means of xi and yi , sx and sy are the sample standard deviations of xi and yi and the sum is from i = 1 to n. As with the population correlation, we may rewrite this as Again, as is true with the population correlation, the absolute value of the sample correlation must be less than or equal to 1. Though the above formula conveniently suggests a single-pass algorithm for calculating sample correlations, it is notorious for its numerical instability (see below for something more accurate).
Appendix (wikipedia on Pearson's Coef.) -2 The sample correlation coefficient is the fraction of the variance in yi that is accounted for by a linear fit of xi to yi . This is written where σy|x2 is the square of the error of a linear fit of yi to xi by the equationy = a + bx and σy2 is just the variance of y Note that since the sample correlation coefficient is symmetric in xi and yi , we will get the same value for a fit of xi to yi : This equation also gives an intuitive idea of the correlation coefficient for higher dimensions. Just as the above described sample correlation coefficient is the fraction of variance accounted for by the fit of a 1-dimensional linear submanifold to a set of 2-dimensional vectors (xi , yi ), so we can define a correlation coefficient for a fit of an m-dimensional linear submanifold to a set of n-dimensional vectors. For example, if we fit a plane z = a + bx + cy to a set of data (xi , yi , zi ) then the correlation coefficient of z to x and y is Non-parametric correlation coefficients: Pearson's correlation coefficient is a parametric statistic, and it may be less useful if the underlying assumption of normality is violated. Non-parametric correlation methods, such as Spearman's ρ and Kendall's τ may be useful when distributions are not normal; they are a little less powerful than parametric methods if the assumptions underlying the latter are met, but are less likely to give distorted results when the assumptions fail. Other measures of dependence among random variables: To get a measure for more general dependencies in the data (also nonlinear) it is better to use the correlation ratio which is able to detect almost any functional dependency, or mutual information which detects even more general dependencies. Copulas and correlation: Most people erroneously believe that the information given by a correlation coefficient is enough to define the dependence structure between random variables. But to fully capture the dependence between random variables we must consider the copula between them. The correlation coefficient completely defines the dependence structure only in very particular cases, for example when the cumulative distribution functions are elliptic (as with, for example, the multivariate normal distribution). Correlation matrices: The correlation matrix of n random variables X1, ..., Xn is the n × n matrix whose i,j entry is corr(Xi, Xj). If the measures of correlation used are product-moment coefficients, the correlation matrix is the same as the covariance matrix of the standardized random variables Xi /SD(Xi) for i = 1, ..., n. Consequently it is necessarily a non-negative definite matrix. The correlation matrix is symmetrical (correlation between Xi and Xj is the same as the correlation between Xj and Xi). "Correlation does not imply causation": The conventional dictum that "correlation does not imply causation" is treated in the article titled spurious relationship. See also correlation implies causation (logical fallacy). However, correlations are not presumed to be acausal, though the causes may not be known. Computing correlation accurately in a single pass: The following algorithm (in pseudocode) will estimate correlation with good numerical stability: sum_sq_x = 0 sum_sq_y = 0 sum_coproduct = 0 mean_x = x[1] mean_y = y[1] last_x = x[1] last_y = y[1] for i in 2 to N: sweep = (i - 1.0) / i delta_x = x[i] - mean_x delta_y = y[i] - mean_y sum_sq_x += delta_x * delta_x * sweep sum_sq_y += delta_y * delta_y * sweep sum_coproduct += delta_x * delta_y * sweep mean_x += delta_x / i mean_y += delta_y / i pop_sd_x = sqrt( sum_sq_x / N ) pop_sd_y = sqrt( sum_sq_y / N ) cov_x_y = sum_coproduct / N correlation = cov_x_y / (pop_sd_x * pop_sd_y) For an enlightening experiment, check the correlation of {900,000,000 + i for i=1...100} with {900,000,000 - i for i=1...100}, perhaps with a few values modified. Poor algorithms will fail.