Incremental PCA — the same rotation, in batches
Incremental PCA updates the mean and the subspace from mini-batches, so the whole matrix never has to sit in memory. On a matrix that does fit, it should land close to ordinary PCA, not on a different definition of a component. Differences you do see come from the batch size and from how many components you asked the running estimate to track.
The batch size has to be at least as large as the number of components, and larger batches follow the exact PCA solution more closely. A batch of a few dozen on a wide table produces a subspace that wanders. If you can hold the CSV in memory, ordinary PCA is the simpler object to explain.
The explained-variance numbers are estimates updated over time. Quote them from a finished pass, not from the middle of the first epoch.
Settings that change this fit
- n components
- Size of the subspace maintained in memory. It is fixed up front; you cannot cheaply ask for one more component after the pass.
- batch size
- Rows per update. Bigger is closer to batch PCA and uses more memory, which is the trade you came here to control.