Commit 3bf1bdcf by simonabottani

Refactor ML

parent 7f9a655d
Pipeline #1073 passed with stages
in 2 minutes 16 seconds
......@@ -433,23 +433,8 @@ class CAPSTSVBasedInput(CAPSInput):
"""
#import pandas as pd
pass
#if self._images is not None:
# return self._images
#print self._group_id
#print self._atlas
#print self._image_type
#if self._image_type == 'T1':
# self._images = str('group-' + self._group_id + '_T1w_space-' + self._atlas + '_map-graymatter')
### to implement for PET
#return self._images
def get_x(self):
"""
......
......@@ -37,7 +37,7 @@ def load_data(images, caps_directory, subjects, sessions, dataset):
participant_id = subjects
print len(participant_id)
session_id = sessions
for i in xrange(len(participant_id)):
......
......@@ -470,6 +470,7 @@ class LearningCurveRepeatedHoldOut(base.MLValidation):
mean_results_df = pd.DataFrame(iteration_results_df.apply(np.nanmean).to_dict(),
columns=iteration_results_df.columns, index=[0, ])
print mean_results_df
mean_results_df.to_csv(path.join(iteration_dir, 'mean_results.tsv'),
index=False, sep='\t', encoding='utf-8')
all_results_list.append(mean_results_df)
......
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