Skip to content

Commit

Permalink
Changes from Felipe
Browse files Browse the repository at this point in the history
  • Loading branch information
meneguzzi committed Nov 30, 2015
1 parent 6a2c77e commit 61f4c6f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
# acerta-abide
Deep learning using the ABIDE data

## Environment Setup


## How to run this code


## How to read the results

## To Do
- [ ] Fill this in
14 changes: 8 additions & 6 deletions prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def load_patients(subjs, mask, tmpl, jobs=10):
msg = 'Done {current} of {total}'
return run_progress(partial_load_patient, subjs, message=msg, jobs=jobs)


def prepare_data(phenotypes_file, tmpl, destination, mask=None):
"""TODO Fill in with a description"""

phenotypes = load_phenotypes(phenotypes_file)
keys = phenotypes.index.get_values()
Expand Down Expand Up @@ -154,7 +154,7 @@ def prepare_data_cv(filename, folds, seed=42, pheno_file=True):

seed = 42
folds = 10
download_it = False
download_it = True

pheno_path = './data/phenotypes/Phenotypic_V1_0b_preprocessed1.csv'
pheno = load_phenotypes(pheno_path)
Expand Down Expand Up @@ -186,11 +186,13 @@ def prepare_data_cv(filename, folds, seed=42, pheno_file=True):

download_data(url_path, download_file)

# tmpl = './data/functionals/cpac/filt_global/func_preproc/%s_func_preproc.nii.gz'
# prepare_data(pheno_path, tmpl, './data/corr/corr.csv', mask='./data/masks/cc200.nii.gz')
# prepare_data_cv('./data/corr/corr.csv', folds, seed=seed)
# prepare_data_cv('./data/corr/corr-norm.csv', folds, seed=seed)
# Our own pipeline (create our version of CC200)
tmpl = './data/functionals/cpac/filt_global/func_preproc/%s_func_preproc.nii.gz'
prepare_data(pheno_path, tmpl, './data/corr/corr.csv', mask='./data/masks/cc200.nii.gz') # Apply CC200 and create the connectivity matrix
prepare_data_cv('./data/corr/corr.csv', folds, seed=seed) # Create folds for training and cv
prepare_data_cv('./data/corr/corr-norm.csv', folds, seed=seed) # Scale data to mean 0 sd 1

# ABIDE's pipeline (their own CC200 parcellations)
tmpl = './data/functionals/cpac/filt_global/rois_cc200/%s_rois_cc200.1D'
prepare_data(pheno_path, tmpl, './data/corr/corr_1D.csv')
prepare_data_cv('./data/corr/corr_1D.csv', folds, seed=seed)
Expand Down

0 comments on commit 61f4c6f

Please sign in to comment.