cascade.metrics.ctfact_mse
- cascade.metrics.ctfact_mse(ctrl, true, pred, by, top_de=None, exclude_self=False, de_key='rank_genes_groups')[source]
Mean squared errors of counterfactual prediction
- 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 consisting of columns –
“true_mse”
”pred_mse”
”normalized_mse”