From ec7ca8f3815bee2ed78cecbc1304af276329e959 Mon Sep 17 00:00:00 2001 From: "Egor.Kraev" Date: Thu, 28 Nov 2024 14:19:36 +0000 Subject: [PATCH] minor test fixes --- causaltune/score/scoring.py | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/causaltune/score/scoring.py b/causaltune/score/scoring.py index 9848311..9a35735 100644 --- a/causaltune/score/scoring.py +++ b/causaltune/score/scoring.py @@ -47,17 +47,17 @@ def supported_metrics(problem: str, multivalue: bool, scores_only: bool) -> List # print("backdoor") if multivalue: # TODO: support other metrics for the multivalue case - return ["energy_distance", "psw_energy_distance"] + return ["psw_energy_distance", "energy_distance"] # TODO: add erupt else: metrics = [ "erupt", "norm_erupt", - "prob_erupt", # NEW + # "prob_erupt", # regular erupt was made probabilistic, no need for a separate one "policy_risk", # NEW "qini", "auc", # "r_scorer", - "energy_distance", + "energy_distance", # is broken without propensity weighting "psw_energy_distance", "frobenius_norm", # NEW "codec", # NEW @@ -1281,7 +1281,7 @@ def make_scores( )[:, 1] values["policy"] = cate_estimate > 0 values["norm_policy"] = cate_estimate > simple_ate - values["weights"] = self.erupt.weights(df, lambda x: cate_estimate > 0) + # values["weights"] = self.erupt.weights(df, lambda x: cate_estimate > 0) else: pass # TODO: what do we do here if multiple treatments? @@ -1297,17 +1297,6 @@ def make_scores( ) out["norm_erupt"] = norm_erupt_score - # if "prob_erupt" in metrics_to_report: - # out["prob_erupt"] = self.erupt.probabilistic_erupt_score( - # df, df[est._outcome_name], estimate, cate_estimate - # ) - - if "prob_erupt" in metrics_to_report: - prob_erupt_score = self.erupt.probabilistic_erupt_score( - df, df[outcome_name], estimate - ) - out["prob_erupt"] = prob_erupt_score - # if "frobenius_norm" in metrics_to_report: # out["frobenius_norm"] = self.frobenius_norm_score(estimate, df)