cpa.CPA.predict#
- CPA.predict(adata=None, indices=None, batch_size=32, n_samples=20, return_mean=True)[source]#
Counterfactual-friendly gene expression prediction
To produce counterfactuals, save adata.X to adata.obsm[‘X_true’] and set it to control cells gene expression.
For the case of reconstruction, you can pass original adata without any further modifications.
- Returns:
None (predictions are saved to adata.obsm[f’CPA_pred’])