From 2138142a663999869c933d6f6515ae6aaa345e07 Mon Sep 17 00:00:00 2001 From: Judith Bernett Date: Mon, 7 Oct 2024 12:24:24 +0200 Subject: [PATCH] small fixed for cross-study setting --- drevalpy/visualization/utils.py | 2 ++ tests/test_run_suite.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drevalpy/visualization/utils.py b/drevalpy/visualization/utils.py index 8ec0fc5..b33c01b 100644 --- a/drevalpy/visualization/utils.py +++ b/drevalpy/visualization/utils.py @@ -251,6 +251,8 @@ def generate_model_names(test_mode, model_name, pred_file): pred_setting = "randomize-" + "-".join(file_parts[1:-2]) elif pred_rand_rob == "robustness": pred_setting = "-".join(file_parts[:2]) + elif pred_rand_rob == "cross": + pred_setting = "cross-study-" + file_parts[2] else: raise ValueError(f"Unknown prediction setting: {pred_rand_rob}") split = "_".join(os.path.basename(pred_file).split(".")[0].split("_")[-2:]) diff --git a/tests/test_run_suite.py b/tests/test_run_suite.py index 70cd4fc..1a3d1ed 100644 --- a/tests/test_run_suite.py +++ b/tests/test_run_suite.py @@ -23,7 +23,7 @@ "randomization_mode": ["SVRC"], "randomization_type": "permutation", "n_trials_robustness": 2, - "cross_study_datasets": [], + "cross_study_datasets": ["GDSC2"], "curve_curator": False, "overwrite": False, "optim_metric": "RMSE",