4

I am looking for a R package that implements Incremental PCA (online version of PCA)

Is there anybody that knows a piece of code that implements such algorithm?

mpiktas
  • 33,140
  • 5
  • 82
  • 138
RockScience
  • 2,731
  • 4
  • 27
  • 46

2 Answers2

1

I have been searching for a solution to a related problem a while back

So, in essence, you want an implementation of an online algorithm to carry QR decomposition of a rank $p$ matrix $A$ (or equivalently to do a series of rank one update to the QR decomposition of $A$).

A function to do rank one update to a QR decomposition is well implemented in matlab, but inexplicably, does not seem to exist in R.

Fortunatly, there is an implementation of this function in Octave under the name qrupdate(Q,R,u,v). From there, you can call any Octave function from within R using the RcppOctave bridging package.

user603
  • 21,225
  • 3
  • 71
  • 135
0

A quick search on http://rseek.org leads to the LPcaML function from the modelcf package. I'm not sure if this is exactly what you want, but it should get you started.

mpiktas
  • 33,140
  • 5
  • 82
  • 138
Paul Hiemstra
  • 470
  • 3
  • 15