pca_irlba_for_sparseMatrix {ChromSCape} | R Documentation

## Run sparse PCA using irlba SVD

### Description

This function allows to run a PCA using IRLBA Singular Value Decomposition in a fast & memory efficient way. The increamental Lanczos bidiagonalisation algorithm allows to keep the matrix sparse as the "loci" centering is implicit. The function then multiplies by the approximate singular values (svd$d) in order to get more importance to the first PCs proportionnally to their singular values. This step is crucial for downstream approaches, e.g. UMAP or T-SNE.

### Usage

    pca_irlba_for_sparseMatrix(x, n_comp, work = 3 * n_comp)

### Arguments

`x` | A sparse normalized matrix (features x cells)
`n_comp` | The number of principal components to keep
`work` | Working subspace dimension, larger values can speed convergence at the cost of more memory use.

### Value

The rotated data, e.g. the cells x PC column in case of sc data.

[Package ChromSCape version 1.2.62 Index]