scglue.models.scglue.SCGLUEModel.encode_data

SCGLUEModel.encode_data(key, adata, batch_size=128, n_sample=None)[源代码]

Compute data (cell) embedding

参数:
  • key (str) – Modality key

  • adata (AnnData) – Input dataset

  • batch_size (int) – Size of minibatches

  • n_sample (typing.Optional[int]) – Number of samples from the embedding distribution, by default None, returns the mean of the embedding distribution.

返回类型:

numpy.ndarray

返回:

data_embedding – Data (cell) embedding with shape \(n_{cell} \times n_{dim}\) if n_sample is None, or shape \(n_{cell} \times n_{sample} \times n_{dim}\) if n_sample is not None.