scglue.models.scglue.SCGLUEModel.encode_data
- SCGLUEModel.encode_data(key, adata, batch_size=128, n_sample=None)[source]
Compute data (cell) embedding
- Parameters:
key (
str
) – Modality keyadata (
AnnData
) – Input datasetbatch_size (
int
) – Size of minibatchesn_sample (
typing.Optional
[int
]) – Number of samples from the embedding distribution, by defaultNone
, returns the mean of the embedding distribution.
- Return type:
- Returns:
data_embedding – Data (cell) embedding with shape \(n_{cell} \times n_{dim}\) if
n_sample
isNone
, or shape \(n_{cell} \times n_{sample} \times n_{dim}\) ifn_sample
is notNone
.