SCGLUEModel.encode_data(key, adata, batch_size=128, n_sample=None)[source]

Compute data (cell) embedding

  • key (str) – Domain key

  • adata (AnnData) – Input dataset

  • batch_size (int) – Size of minibatches

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

Return type

Union[ndarray, Tuple[ndarray, 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.