cascade.metrics.ctfact_dir_acc
- cascade.metrics.ctfact_dir_acc(ctrl, true, pred, by, top_de=None, exclude_self=False, de_key='rank_genes_groups')[source]
Directional accuracy of counterfactual predictions
- Parameters:
ctrl (
AnnData) – Control datasettrue (
AnnData) – True interventional effect datasetpred (
AnnData) – Predicted counterfactual effect datasetby (
str) – Intervention variable to group by in theobsslottop_de (
int) – Number of top differentially expressed genes to considerexclude_self (
bool) – Whether to exclude the perturbed genes themselvesde_key (
str) – Key to the differential expression results
- Return type:
- Returns:
Counterfactual metric data frame containing column “dir_acc”