sctour.predict.predict_latentsp
- sctour.predict.predict_latentsp(model: sctour.train.Trainer, adata: anndata._core.anndata.AnnData, mode: Literal['coarse', 'fine'] = 'fine', alpha_z: float = 0.5, alpha_predz: float = 0.5, step_size: Optional[int] = None, step_wise: bool = False, batch_size: Optional[int] = None) tuple [source]
Predict the latent representations for query cells given their transcriptomes.
- Parameters
model – A
sctour.train.Trainer
for trained scTour model.adata – An
AnnData
object for the query dataset.mode – The mode for deriving the latent space for the query dataset. Two modes are included:
'fine'
: derive the latent space by taking the training data into consideration;'coarse'
: derive the latent space directly from the query data without involving the training data.alpha_z – Scaling factor for encoder-derived latent space. (Default: 0.5)
alpha_predz – Scaling factor for ODE-solver-derived latent space. (Default: 0.5)
step_size – The step size during integration.
step_wise – Whether to perform step-wise integration by iteratively considering only two time points each time. (Default: False)
batch_size – Batch size when deriving the latent space. The default is no mini-batching.
- Returns
3-tuple of weighted combined latent space, encoder-derived latent space, and ODE-solver-derived latent space.
- Return type