cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
AT
AT
Level V

Whitening the correlation using PCA

Hi,

I have a simple Y vs. X with some linear correlation. I like to de-correlate  (whitening) Y vs. X. I know how to use Principal Component Analysis to get the new uncorrelated principal component Y and X. How do you transform the new component to the original X and Y scale in JMP?

 

I appreciate your help.

 

Thanks

Adam

1 ACCEPTED SOLUTION

Accepted Solutions
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Whitening the correlation using PCA

Hello @AT,

 

I am a little confused about your goal here.  Here are two things I think you might be trying to do.  Is either close?

After accounting for the variation in height that corresponds with weight, what other variation in height is there?

To do this you could do a PCA with height and weight and save the predicted values (PCA Platform > Red Triangle > Save Columns > Predicteds), and then subtract the predicted from the actual value using additional columns in your data table.  This will give you the residual which is the variation in height that is not correlated with weight.  The units on these variables are the same as the original variables, but their values will be centered around zero.

 

OR you might mean:

 

Produce single set of variables to represent both height and weight, such that the new varaibles are uncorrelated with each other, and which would be used in other analyses.

In this case you would not transform the variables back to the original space, but rather use them as latent variables.  To do this, save the principal component values (PCA Platform > Red Triangle > Save Columns > Principal Components). These latent variables do not have units, and when examining them in any other analysis, you would need to consider their loadings to see how they effect both height and weight.

View solution in original post

4 REPLIES 4
SDF1
Super User

Re: Whitening the correlation using PCA

Hi @AT ,

 

  If I understand what you're after, you want to know how to go from the principle components back to X and Y, is that correct?

 

  For example, if you have a three component system: X1, X2, X3 and you perform a PCA you have Prin1, Prin2, and Prin3. These PCs will be linear combinations of X1, X2, and X3 with coefficients that are the eigenvalues. You can get the eigenvalues and eigenvectors from the hot button next to the PC at the top of the report.

 

  The Eigenvector matrix shows you what the coefficients are to get the linear combination of either what X1 is in terms of Prin1, Prin2, and Prin3 (row in table), or you can find what Prin1 is in terms of X1, X2, X3 (column in table). See an example screen shot below.

DiedrichSchmidt_0-1616783208631.png

  The Eigenvalue table should give you want you're looking for.

 

Hope this helps!,

DS

AT
AT
Level V

Re: Whitening the correlation using PCA

Hi DS,

 

Thanks for quick response. After PCA, the P1 and P2 are given in terms of X and Y (two variables). I know my original X, and Y but I like to get de-correlated Y vs. X. For instance from a highly correlated weight vs. height, I like to get de-correlated unscaled weight vs. height after removal of correlation effect.

 

Thanks again.

 

Regards,

Adam

ih
Super User (Alumni) ih
Super User (Alumni)

Re: Whitening the correlation using PCA

Hello @AT,

 

I am a little confused about your goal here.  Here are two things I think you might be trying to do.  Is either close?

After accounting for the variation in height that corresponds with weight, what other variation in height is there?

To do this you could do a PCA with height and weight and save the predicted values (PCA Platform > Red Triangle > Save Columns > Predicteds), and then subtract the predicted from the actual value using additional columns in your data table.  This will give you the residual which is the variation in height that is not correlated with weight.  The units on these variables are the same as the original variables, but their values will be centered around zero.

 

OR you might mean:

 

Produce single set of variables to represent both height and weight, such that the new varaibles are uncorrelated with each other, and which would be used in other analyses.

In this case you would not transform the variables back to the original space, but rather use them as latent variables.  To do this, save the principal component values (PCA Platform > Red Triangle > Save Columns > Principal Components). These latent variables do not have units, and when examining them in any other analysis, you would need to consider their loadings to see how they effect both height and weight.

AT
AT
Level V

Re: Whitening the correlation using PCA

Hi DS,

Thanks for your response and sorry for confusion. My goal is your first scenario, I like to remove the effect of height from weight and see the distribution of weight without effect of height. Thanks for the help.

 

Regards,

Adam