File list

File name Description Comment
build_model.py Model builder by Lenet5 and Net ipynb is jupyter version (Net version only)
build_model_ica.py Model builder by ICA Not completed
build_model_lenet.ipynb Jupyter version Lenet5 Model builder
dot_age_full.txt Full age <-> group mapping Original dot_age.txt
dot_age_test.txt Testing set of age <-> group mapping used by predict.py: generate
dot_group.txt Training set of subject mapping dot_subject.txt + dot_group.txt = dot_age_full.txt
dot_subjects_full.txt Full age <-> group mapping
dot_subjects_test.txt Test set of age <-> group mapping
dot_subjects.txt Training set of subject mapping dot_subject.txt + dot_group.txt = dot_age_full.txt
lenet5.pt Saved lenet5 model
net.pt Saved net model
predict.py Perform predicting by unknown testing set
randomize.py Separate original date to 2 set:Training set / Testing set

Pre-processing

For archive the age group mapping target,  the fMRI data are prepossessed, and the fMRI data and the functional connectivity (FNC) matrix between each brain area are calculated respectively.

We use UMCP ( https://github.com/jbrown81/umcp ) tool for calculating this data by transferring our nii data of fMRI 4D

The output is a npy file contains 165 x 165 symmetric matrix.

Here is example of 3x3:

0.000000000000000000e+00 8.684753352306536778e-01 8.475200405138061388e-01

8.684753352306537888e-01 0.000000000000000000e+00 9.139195847122992822e-01

8.475200405138061388e-01 9.139195847122992822e-01 0.000000000000000000e+00

The diagonal element is zero in this matrix. You cannot read npy file directly because it’s for more precise processing by Numpy, so it is not plain text.

For randomize our input, we use randomize.py for split training set and testing set, ratio is 80/20 (TEST_SAMPLE_RATE variable in randomize.py)

We have 152 samples, it means training set will be 121 and testing set is 31

There order has been snuffled in script:

a. open dot_group_full.txt and dot_subject_full.txt

6 with open('dot_subjects_full.txt', 'r') as subject, open('dot_group_full.txt', 'r') as group:
b. store all subject <-> group mapping
7     for subline, groupline in zip(subject, group):
8         train_index[subline.strip('\\n')] = groupline.strip('\\n')