diff --git a/Snakefile b/Snakefile index 83882ac4..7c5749d7 100644 --- a/Snakefile +++ b/Snakefile @@ -551,9 +551,6 @@ if config["PARAMS_FOR_ANALYSIS"]["TARGET"]["COMPUTE"]: files_to_compute.extend(expand("data/processed/models/population_model/z_input.csv")) #files_to_compute.extend(expand("data/processed/models/individual_model/{pid}/output_{cv_method}/baselines.csv", pid=config["PIDS"], cv_method=config["PARAMS_FOR_ANALYSIS"]["CV_METHODS"])) -# Put the for loop over STANDARDIZATION providers if all are COMPUTE == True -# then merge all that are set to True in z_all_sensors for all and each participant -# See the logic behind: in each sensor the "data/processed/features/all_participants/all_sensor_features.csv" is listed rule all: input: diff --git a/rules/features.smk b/rules/features.smk index 24f700eb..5331d827 100644 --- a/rules/features.smk +++ b/rules/features.smk @@ -1135,7 +1135,7 @@ rule clean_standardized_sensor_features_for_individual_participants: script_extension = "{script_extension}", sensor_key = "all_cleaning_individual" output: - "data/processed/features/{pid}/z_all_sensor_features_cleaned_{provider_key}_{script_extension}.csv" # bo predstavljalo probleme za naprej (kako iskati datoteke + standardizacija itd.) + "data/processed/features/{pid}/z_all_sensor_features_cleaned_{provider_key}_{script_extension}.csv" script: "../src/features/entry.{params.script_extension}" diff --git a/rules/models.smk b/rules/models.smk index 34a7a937..3aade69a 100644 --- a/rules/models.smk +++ b/rules/models.smk @@ -30,7 +30,7 @@ rule baseline_features: rule select_target: input: - cleaned_sensor_features = "data/processed/features/{pid}/z_all_sensor_features_cleaned_rapids_R.csv" + cleaned_sensor_features = "data/processed/features/{pid}/z_all_sensor_features_cleaned_straw_py.csv" params: target_variable = config["PARAMS_FOR_ANALYSIS"]["TARGET"]["LABEL"] output: @@ -40,7 +40,7 @@ rule select_target: rule merge_features_and_targets_for_population_model: input: - cleaned_sensor_features = "data/processed/features/all_participants/z_all_sensor_features_cleaned_rapids_R.csv", + cleaned_sensor_features = "data/processed/features/all_participants/z_all_sensor_features_cleaned_straw_py.csv", demographic_features = expand("data/processed/features/{pid}/baseline_features.csv", pid=config["PIDS"]), params: target_variable=config["PARAMS_FOR_ANALYSIS"]["TARGET"]["LABEL"] @@ -51,7 +51,7 @@ rule merge_features_and_targets_for_population_model: # rule select_target: # input: -# cleaned_sensor_features = "data/processed/features/{pid}/all_sensor_features_cleaned_rapids_R.csv" +# cleaned_sensor_features = "data/processed/features/{pid}/all_sensor_features_cleaned_straw_py.csv" # params: # target_variable = config["PARAMS_FOR_ANALYSIS"]["TARGET"]["LABEL"] # output: @@ -61,7 +61,7 @@ rule merge_features_and_targets_for_population_model: # rule merge_features_and_targets_for_population_model: # input: -# cleaned_sensor_features = "data/processed/features/all_participants/all_sensor_features_cleaned_rapids_R.csv", +# cleaned_sensor_features = "data/processed/features/all_participants/all_sensor_features_cleaned_straw_py.csv", # demographic_features = expand("data/processed/features/{pid}/baseline_features.csv", pid=config["PIDS"]), # params: # target_variable=config["PARAMS_FOR_ANALYSIS"]["TARGET"]["LABEL"] diff --git a/src/models/helper.py b/src/models/helper.py index 77f3260e..61f9f666 100644 --- a/src/models/helper.py +++ b/src/models/helper.py @@ -10,7 +10,7 @@ def retain_target_column(df_input: pd.DataFrame, target_variable_name: str): if all(~target_variable_index): raise ValueError("The requested target (", target_variable_name, ")cannot be found in the dataset.", - "Please check the names of phone_esm_ columns in all_sensor_features_cleaned_rapids_R.csv") + "Please check the names of phone_esm_ columns in z_all_sensor_features_cleaned_straw_py.csv") sensor_features_plus_target = df_input.drop(esm_names, axis=1) sensor_features_plus_target["target"] = df_input[esm_names[target_variable_index]] # We will only keep one column related to phone_esm and that will be our target variable.