From b4f6c69dff76f7b03a9fc827da2e512478144e9b Mon Sep 17 00:00:00 2001 From: Elina Thibeau-Sutre Date: Mon, 8 Feb 2021 12:21:19 +0100 Subject: [PATCH] Fix balance of age and sex for MCI --- clinicadl/clinicadl/tools/tsv/data_split.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clinicadl/clinicadl/tools/tsv/data_split.py b/clinicadl/clinicadl/tools/tsv/data_split.py index d9ede0384..91f9b8ecd 100644 --- a/clinicadl/clinicadl/tools/tsv/data_split.py +++ b/clinicadl/clinicadl/tools/tsv/data_split.py @@ -291,7 +291,7 @@ def split_diagnoses(formatted_data_path, # Find similarity of distribution for the age variable if len(set(age)) != 1: age_test = [float(age[idx]) for idx in idx_test] - age_train = [float(age[idx]) for idx in idx_train] + age_train = [float(age[idx]) for idx in idx_train] + sup_train_age t_age, p_age = ttest_ind(age_test, age_train) else: @@ -300,7 +300,7 @@ def split_diagnoses(formatted_data_path, # Find similarity of distribution for the sex variable if len(set(sex)) != 1: sex_test = [sex_dict[sex[idx]] for idx in idx_test] - sex_train = [sex_dict[sex[idx]] for idx in idx_train] + sex_train = [sex_dict[sex[idx]] for idx in idx_train] + sup_train_sex T_sex = chi2(sex_test, sex_train) else: T_sex = 0