shannonca.embedders.SVDEmbedder

class shannonca.embedders.SVDEmbedder(n_comps=50, svd_mat=None, **kwargs)

Embedder that projects data to its top right singular vectors.

__init__(n_comps=50, svd_mat=None, **kwargs)

Constructor

Parameters:
  • n_comps (int) – Number of top singular vectors to keep. Defines output dimensionality.

  • svd_mat (numpy.ndarray | matrix | spmatrix) – if provided, project the input to the right singular vectors of this matrix. If None (default), project to singular vectors of the input.

  • kwargs – Additional arguments passed to scanpy.tl.pca

Methods

__init__([n_comps, svd_mat])

Constructor

embed(X[, keep_loadings])

Project X onto a set of top right singular vectors, and return the result