cascade.model.CASCADE.counterfactual
- CASCADE.counterfactual(adata, batch_size=128, n_devices=1, design=None, fixed_genes=None, sample=False, ablate_latent=False, ablate_interv=False, ablate_graph=False)[source]
Counterfactual deduction for the outcome of alternative interventions for an observed dataset
- Parameters:
adata (
AnnData) – Input datasetbatch_size (
int) – Batch sizen_devices (
int) – Number of GPU devices to usedesign (
IntervDesign|None) – Optional intervention design module fromdesign()fixed_genes (
list[str] |None) – Optional list of genes to keep their values fixedsample (
bool) – Whether to sample from the counterfactual distribution (True) or use the mean (False)ablate_latent (
bool) – If True, removes the effect of latent variablesablate_interv (
bool) – If True, removes the effect of interventionsablate_graph (
bool) – If True, removes the effect of the causal graph
- Return type:
- Returns:
Counterfactual dataset with –