1

So, I know that at first glance this looks like it would be answered here, but I think my situation is slightly different.

I'm trying to adapt this algorithm into an R script because there isn't an available package yet, and I'm running into a problem projecting a matrix onto existing loadings (rotations from prcomp function).

However, the matrix I'm trying to project is considerably larger than the matrix of rotations. There aren't any errors when multiplying A (dim 578x384) by rotations (dim 92x92), but I feel like that can't be giving a good result.

I've also tried the predict() function to no avail; I could really do with some advice.

Is what I'm trying to do impossible, or is there a workaround?

Artemisia
  • 111
  • 2
  • You are misunderstanding the method from the paper. It's mathematically impossible to mutipl 578x384 matrix by 92x92 matrix and they do not do anything like that. – amoeba Mar 09 '17 at 14:19
  • Do you have any suggestions as to what I should be doing instead, then? That's the only way I could understand it. – Artemisia Mar 09 '17 at 14:38
  • Can you point to a specific place in the paper where this, you think, is happening? – amoeba Mar 09 '17 at 14:38
  • page 18: methods, step 2 – Artemisia Mar 09 '17 at 14:47
  • Right. So they multiply $X_A$ with $[v_1, v_2, ... v_n]$. Here $X_A$ is of $|A|\times p$ size, and each $v_i$ is a PCA eigenvector of $X_B$ which is of $|B|\times p$ size. This means that each $v_i$ is of length $p$, and the whole projection matrix is of size $p\times n$. So in step 2 they multiply a matrix of $|A|\times p$ size with a matrix of $p\times n$ size. It fits! – amoeba Mar 09 '17 at 14:50
  • Okay, so, my "XA" is of size 587x384. I run my PCA on "XB", which is 92x384, and like you said, get a matrix of v where the column for each PC is 384 long (so, overall, 384x92). I can transpose v to be 92x384, but how does this then work for the multiplication? (I know this should be so simple, sorry). – Artemisia Mar 09 '17 at 15:01
  • Why do you transpose? Multiply 587x384 with 384x92, what's the problem with that? – amoeba Mar 09 '17 at 15:03
  • Let us [continue this discussion in chat](http://chat.stackexchange.com/rooms/55066/discussion-between-artemisia-and-amoeba). – Artemisia Mar 09 '17 at 15:05

0 Answers0