Skip to content

Commit

Permalink
Fix balance of age and sex for MCI
Browse files Browse the repository at this point in the history
  • Loading branch information
14thibea committed Feb 8, 2021
1 parent e491533 commit b4f6c69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clinicadl/clinicadl/tools/tsv/data_split.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit b4f6c69

Please sign in to comment.