scib_metrics.utils.pca#

scib_metrics.utils.pca(X, n_components=None, return_svd=False)[source]#

Principal component analysis (PCA).

Parameters:
X ndarray | Array

Array of shape (n_cells, n_features).

n_components int | None (default: None)

Number of components to keep. If None, all components are kept.

return_svd bool (default: False)

If True, also return the results from SVD.

Return type:

_PCAResult

Returns:

results: _PCAData