From cc5cce9ccb7abf5ae106641cc30f2413584b2532 Mon Sep 17 00:00:00 2001 From: Thomas M Kehrenberg Date: Fri, 23 Feb 2024 18:31:17 +0100 Subject: [PATCH] Add more ablation plots --- analysis/tmlr/nicopp_more_ablations.py | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 analysis/tmlr/nicopp_more_ablations.py diff --git a/analysis/tmlr/nicopp_more_ablations.py b/analysis/tmlr/nicopp_more_ablations.py new file mode 100644 index 00000000..ccd4221f --- /dev/null +++ b/analysis/tmlr/nicopp_more_ablations.py @@ -0,0 +1,51 @@ +# %% +import sys + +sys.path.append("..") + +# %% +from pathlib import Path + +from ranzen.wandb import RunsDownloader +from wandb_utils import CustomMethod, Group, MethodName, Metrics, download_groups, plot + +# %% +downloader = RunsDownloader(project="support-matching", entity="predictive-analytics-lab") + +# %% +data = download_groups( + downloader, + { + # "our_method_2023-10-02": Group(MethodName.ours_bag_oracle, "test/y_from_zy/", ""), + "our_method_no_balancing_2023-10-19": Group( + MethodName.ours_no_balancing, "test/y_from_zy/", "" + ), + "ours_2023-12-19_no_recon_loss": Group( + CustomMethod("Without recon loss"), "test/y_from_zy/", "" + ), + # "ours_2023-12-19_no_zs": Group(CustomMethod("no zs split"), "test/y_from_zy/", ""), + "ours_2023-12-19_no_y_predictor": Group( + CustomMethod("Without $y$-predictor"), "test/y_from_zy/", "" + ), + "ours_2024-01-05_no_disc_loss": Group( + CustomMethod("Without disc loss"), "test/y_from_zy/", "" + ), + }, +) +data = data.rename(columns={"Robust_OvR_TPR": "Robust OvR TPR"}) + +# %% +plot( + data, + metrics=[Metrics.acc, Metrics.rob_tpr_ovr], + # metrics=[Metrics.acc], + # x_label="noise level", + # x_limits=(0.48, 1), + # plot_style=PlotStyle.boxplot_hue, + file_format="pdf", + fig_dim=(5.0, 1.0), + file_prefix="nicopp", + output_dir=Path("nicopp") / "more_ablation", +) + +# %%