From fa45b3095588f346a4a0af137280b660423bf96b Mon Sep 17 00:00:00 2001 From: junos Date: Thu, 18 May 2023 18:40:54 +0200 Subject: [PATCH] Set output path programmatically. --- exploration/ml_pipeline_classification.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/exploration/ml_pipeline_classification.py b/exploration/ml_pipeline_classification.py index 3bdcce2..952b794 100644 --- a/exploration/ml_pipeline_classification.py +++ b/exploration/ml_pipeline_classification.py @@ -116,9 +116,8 @@ data_y.shape # %% scores = run_all_classification_models(data_x, data_y, data_groups, cross_validator) # %% -scores.to_csv( - "../presentation/results/appraisal_stressfulness_awake_classification_" - + CV_METHOD - + ".csv", - index=False, +PATH_OUTPUT = Path("..") / Path("presentation/results") +path_output_full = PATH_OUTPUT / ( + TARGET_VARIABLE + SEGMENT_LENGTH + "_classification_" + CV_METHOD + ".csv" ) +scores.to_csv(path_output_full, index=False)