Talk:Principal component analysis

message: I have changed the introduction of X, so it is now defined to be the standard way round for data matrices -- i.e. with each row representing measurements from a single sample, and each column representing a variable that was measured, rather than the other way round which was unnecessarily confusing.
I've then gone through the text and made the appropriate changes diff -- I hope I got them all!
The article is still pretty horrible, but this may make it a little easier to take forward. Jheald (talk) 19:09, 17 June 2013 (UTC)
thread_title:  X changed to be the standard way round for a data matrix 

message: Since 2006, the bit on converting input data to z-scores has been confused and messed up.  Here, for example, the retired editor who did most of the detailed article writing around that time moved that bit from one place it didn't fit to another.  It certainly doesn't fit where it is now, since the eigenvectors are based on the transformed data that they're used to transform.
The easies fix is to just take out that optional section that is wrong and doesn't fit.  A better mix might be to put that option up front in defining the B matrix (as B = Z instead of what it is now), after which the rest would make sense; that is, the option is between the present \mathbf{B} = \mathbf{X} - \mathbf{h}\mathbf{u}^{T}  and a version that divides each row of that by its standard deviation.
Any preferences, or anyone willing to work it over? Dicklyon (talk) 06:58, 12 February 2018 (UTC)
replies: text: It's still messed up, and I need to fix it, since the last step with the KLT refers to using the Z that is now not defined.  It's not clear what's the best way to use B or Z depending on your application, but I did add a few words about what normalizing the input data variance can be good for. Dicklyon (talk) 18:10, 23 August 2020 (UTC)
thread_title:  The z-score bit is messed up 

message: As at 27 Sept 2021 the introduction uses p for the number of principal components and i to index individual principal components.
The Details section uses l for the number of principal components and k to index individual principal components. It uses p for the dimension of the underlying vectors and i to index individual rows in the data matrix.
To avoid creating unnecessary confusion for the first-time reader, I propose changing the Introduction to use pronumerals in the same way as in the Details section, ie replace p by l and replace i by k.
I just wanted to check first whether I have misunderstood something. Please let me know if I have. Ajkirk (talk) 22:48, 26 September 2021 (UTC)
thread_title:  Pronumerals inconsistent between Introduction and Details sections 

message: Please add a description in the article Biggerj1 (talk) 23:02, 8 November 2021 (UTC)
thread_title:  Biplots and scree plots 

message: The (now deleted by me) statement "Given a set of points in Euclidean space, the first principal component corresponds to a line that passes through the multidimensional mean and minimizes the sum of squares of the distances of the points from the line" is incorrect. Counterexamples are easy to find, e.g. if mean is 0. Another example is in 2d for a cloud of points with \langle y\rangle = 0 and \langle xy\rangle = 0. For this example, 
\frac1{N} XX^T = \begin{bmatrix} \langle x^2\rangle + \langle x \rangle^2 & 0 \\ 0 &  \langle y^2\rangle\end{bmatrix}.
PCs are along \hat y and \hat x, only the \hat x one goes through the mean/ center of gravity. But \hat y is the largest component if \langle x^2\rangle + \langle x\rangle ^2 <  \langle y^2 \rangle . This example corresponds to the figure.
More generally, for 
X = \sum_{k=1}^P\sigma_k {\hat u}_k {\hat v}^T_k 
an M\times N matrix with P singular values, (column) mean is 
\frac1{N}\sum_{k=1}^P\sigma_k {\hat u}_k \sum_j(\hat{v}_k)_j, 
while first principal component is {\hat u}_1   — Preceding unsigned comment added by Sunejdk (talk • contribs) 08:45, 5 December 2021 (UTC)
thread_title:  Incorrect statement in section 4 Further Considerations 

message: This paragraph exclusively discusses factor analysis, never PCA.  Why is it here?  (Article already mentions FA earlier, with appropriate links.) Jmacwiki (talk) 19:26, 11 June 2022 (UTC)
thread_title:  Applications: Intelligence section doesn't belong. 

message: In the section on how PCA relates to the SVD the SVD is described as X=U Sigma W^T, yet the page for SVD describes it as U Sigma V^T. Is there any reason as to why this page uses W instead of V? If there isn't, then it should be changed to be consistent with the main SVD page. 31.205.215.152 (talk) 00:15, 19 January 2023 (UTC)
thread_title:  Notation for the SVD uses W instead of V