Commit 070491c9 by simonabottani

Add abstract class to read tsv files for ML

parent f6aea4fe
Pipeline #986 passed with stages
in 1 minute 48 seconds
......@@ -15,7 +15,7 @@ __email__ = "simona.bottani@icm-institute.com"
__status__ = "Development"
def load_data(images, caps_directory, subjects_visits_tsv, dataset):
def load_data(images, caps_directory, subjects, sessions, dataset):
"""
Args:
......@@ -36,9 +36,9 @@ def load_data(images, caps_directory, subjects_visits_tsv, dataset):
if dataset == 'OASIS':
df = df[df.age_bl > 61]
subjects_visits = pd.io.parsers.read_csv(os.path.join(subjects_visits_tsv), sep='\t')
participant_id = subjects_visits.participant_id.values
session_id = subjects_visits.session_id.values
#subjects_visits = pd.io.parsers.read_csv(os.path.join(subjects_visits_tsv), sep='\t')
participant_id = subjects
session_id = sessions
for i in xrange(len(participant_id)):
df_sub = df[df.participant_id == participant_id[i]]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment