Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

I am wondering if I can use the results of EOF to "predict" the EOF loadings of a second set of data?

I have a data set $X$ that consists of sampled light spectra (each column represents a sample and each row is the amplitude of the spectra at a given wavelength). So I first construct a covariance matrix of my data:

$C=XX^T$

This is then decomposed using an eigendecomposition:

$C=E \lambda E^T$

with $E$ being the EOF loadings. I then project my data $X$ onto the loadings to get the principal components $Z$ :

$Z = XE$

Now my question is if I can use the results of the EOF to project a second set of spectra data $Y$ into EOF loadings $E_{\mathrm{pred}}$ using the principal components $Z$ :

$ZY^{-1} = E_{\mathrm{pred}}$

I haven't come across EOF being used in such a way (e.g. as a predictive model) but, given the amount of literature around EOF and PCA, I'm probably just missing something. Is there a problem with this approach? Does anyone know of examples using such EOF as a predictive model?

Many thanks for any advice.

share|improve this question
Is $Y$ always a square matrix? – user10525 May 22 '12 at 12:52
No, $Y$ has the same number of rows as $X$, allowing for its projection onto $Z$. Also, in case you were wondering, $Y^{-1}$ is calculated as the pseudoinverse of $Y$. – Marc in the box May 22 '12 at 13:09
1  
Confused; $\mathbf{Y}$ should have the same columns as $\mathbf{X}$ for prediction/projection. The EOFs or PCs are linear combinations of the the columns in the original data (the variables). IIRC, the predicted location in the reduced space is the weighted sum of the variable scores on EOFs 1 & 2, the weights coming from the values of the new data $\mathbf{Y}$. See ?predict.prcomp in R as one example. – Gavin Simpson May 23 '12 at 8:12
@Gavin Simpson - thanks for your reply. I got a similar suggestion through the r-sig-ecology forum. I probably should have specified the dimensions of the matrices - $X$ is an m X n matrix with m variables and n samples. Therefore, $E$ will be the weights of the EOFs (an n X n matrix) and $Z$ will be the EOF coefficients (an m X n matrix), which is just the projection of the data $X$ onto $E$. My question dealt with the projection of the second set of data $Y$ (an m X p) matrix (i.e. a different number of samples p, but same number of variables m) onto $Z$. Thus, $E_{pred}$ is a p X n matrix. – Marc in the box May 23 '12 at 8:35

1 Answer

up vote 1 down vote accepted

I have received an answer through another forum that indicates that this is a common practice - "Basic R stats functions like prcomp have a predict method that can be used to "predict" (calculate) scores with 'newdata'. This is standard, and has been in R for ever. Most textbooks of multivariate analysis should handle this issue."

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.