Input to PCA - Data Science Central2019-12-10T06:27:50Zhttps://www.datasciencecentral.com/forum/topics/input-to-pca?feed=yes&xn_auth=noThe result of the PCA won't b…tag:www.datasciencecentral.com,2019-09-08:6448529:Comment:8854842019-09-08T15:10:55.189ZYassin Jomnihttps://www.datasciencecentral.com/profile/YassinJomni
<p>The result of the PCA won't be normalized.</p>
<p></p>
<p>PCA is an orthogonal linear transformation between your initial data space and a new space that is spanned by the eigenvectors of the covariance/correlation matrix.</p>
<p></p>
<p>The only thing you could say is that your data in this new space will be expressed as a linear combination of several orthogonal (not orthonormal) eigenvectors (also called principal components). This will make it easier to model and work with your data…</p>
<p>The result of the PCA won't be normalized.</p>
<p></p>
<p>PCA is an orthogonal linear transformation between your initial data space and a new space that is spanned by the eigenvectors of the covariance/correlation matrix.</p>
<p></p>
<p>The only thing you could say is that your data in this new space will be expressed as a linear combination of several orthogonal (not orthonormal) eigenvectors (also called principal components). This will make it easier to model and work with your data (scalar prod in orthogonal spaced is easier to work with so on).</p>
<p></p>
<p>I guess these eigenvectors (principal components) could be your features but you need to normalize them your self :)</p> It depends. You can compute t…tag:www.datasciencecentral.com,2019-09-08:6448529:Comment:8854782019-09-08T14:37:44.824ZYassin Jomnihttps://www.datasciencecentral.com/profile/YassinJomni
<p>It depends. You can compute the PCA in two ways:</p>
<p></p>
<p>1- By computing the eigenvalues and eigenvectors of the covariance matrix: In this case, you need to normalize your data (between 0-1)</p>
<p></p>
<p>2- By computing the eigenvalues and eigenvectors of the (pearson) correlation matrix: In this case you don't need to normalize your data.</p>
<p></p>
<p>The proof of this is very easy: The covariance matrix of the normalized data IS the correlation matrix :)</p>
<p></p>
<p>My…</p>
<p>It depends. You can compute the PCA in two ways:</p>
<p></p>
<p>1- By computing the eigenvalues and eigenvectors of the covariance matrix: In this case, you need to normalize your data (between 0-1)</p>
<p></p>
<p>2- By computing the eigenvalues and eigenvectors of the (pearson) correlation matrix: In this case you don't need to normalize your data.</p>
<p></p>
<p>The proof of this is very easy: The covariance matrix of the normalized data IS the correlation matrix :)</p>
<p></p>
<p>My advice: if you're not implementing PCA your self then check the package you're using on how it was implemented (using covariance or correlation matrix).</p> Scaling the input variables i…tag:www.datasciencecentral.com,2019-09-03:6448529:Comment:8815672019-09-03T12:46:33.324ZT. Dickinsonhttps://www.datasciencecentral.com/profile/TDickinson
<p>Scaling the input variables is your job as the analyst. Do you want to center and spherize the data? if so, center the data by subtracting the mean vector from all data vectors and sweep out the standard deviations. The result will be a mean vector of zeroes and a variance in all directions of one. Or, you could preserve the original covariance structure by centering by the vector of variable minima, and scale by the vector of variable ranges (this will give you the desired {0,1} interval…</p>
<p>Scaling the input variables is your job as the analyst. Do you want to center and spherize the data? if so, center the data by subtracting the mean vector from all data vectors and sweep out the standard deviations. The result will be a mean vector of zeroes and a variance in all directions of one. Or, you could preserve the original covariance structure by centering by the vector of variable minima, and scale by the vector of variable ranges (this will give you the desired {0,1} interval for all your variables).</p>
<p>You also have to pay attention to the scales on which the variables are measured. Are they all ratio scale? If not then consider using Gower's coefficient for mixed data (implement with daisy() in the R cluster pkg) and then do a principal coordinates analysis. The ape pkg has a nice routine and I think it lets you create biplots as in PCA (it also gives you the broken-stick criterion for evaluating which dimensions are worth trying to interpret).</p>
<p>Biplots are handy because they show you something about the relationship between individual variables and their m'variate summary.</p> Thanks, but I want to know, d…tag:www.datasciencecentral.com,2019-08-28:6448529:Comment:8793312019-08-28T17:18:16.977ZVishal Kapurhttps://www.datasciencecentral.com/profile/VishalKapur
<p>Thanks, but I want to know, do we need to do the scaling of data before PCA, so that all independent variable lies betwee 0 & 1??</p>
<p>Thanks, but I want to know, do we need to do the scaling of data before PCA, so that all independent variable lies betwee 0 & 1??</p> PCA is one approach to it, ho…tag:www.datasciencecentral.com,2019-08-28:6448529:Comment:8791562019-08-28T16:52:20.691ZJeremy Irelandhttps://www.datasciencecentral.com/profile/JeremyIreland
PCA is one approach to it, however, what is your main goal? If you want to reduce variables and group them into indices, PCA is an adequate approach. If you intend on using all 20 IVs, some form of linear/log regression may be best.<br />
<br />
Is this survey data (categorical data) or strictly continuous? Has the survey been psychometrically validated previously or generated independently?
PCA is one approach to it, however, what is your main goal? If you want to reduce variables and group them into indices, PCA is an adequate approach. If you intend on using all 20 IVs, some form of linear/log regression may be best.<br />
<br />
Is this survey data (categorical data) or strictly continuous? Has the survey been psychometrically validated previously or generated independently?