```python
#Imports

import warnings
warnings.simplefilter('ignore')

# For reading data sets from the web.
import pandas
# For lots of great things.
import numpy as np
# To make our plots.
import matplotlib.pyplot as plt
%matplotlib inline
# Because sympy and LaTeX make
# everything look wonderful!
from sympy import *
init_printing(use_latex=True)
from IPython.display import display
# We will use this to check our implementation...
from sklearn.decomposition import PCA
# We will grab another data set using Keras
# after we finish up with Iris...
import keras
from keras_tqdm import TQDMNotebookCallback

import nilearn
from nilearn import plotting
from nilearn import image
from nilearn import datasets
from nilearn.decomposition import CanICA
from nilearn.input_data import NiftiMasker
from nilearn import image
from nilearn.plotting import plot_stat_map, show
```

    Using TensorFlow backend.
    /anaconda3/lib/python3.6/importlib/_bootstrap.py:219: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__
      return f(*args, **kwds)

```python
# Load Dataset
dataset = nilearn.datasets.fetch_cobre(n_subjects=146, data_dir="/Users/KJP/Desktop/neural nets/Cobre Dataset2", url=None, verbose=1)
file_paths = dataset["func"]
confounds = dataset["confounds"]
file_paths.sort() #sort file names by alphabetical order, which will result in sorting by patient number
confounds.sort()
del file_paths[74]                           # number 74 is misisng samples so it needs to be removed
del confounds[74]
```

    /anaconda3/lib/python3.6/site-packages/nilearn/datasets/func.py:1635: ResourceWarning: unclosed file <_io.TextIOWrapper name='/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/4197885' mode='r' encoding='UTF-8'>
      files = json.load(open(files, 'r'))
    /anaconda3/lib/python3.6/site-packages/numpy/lib/npyio.py:2278: VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.
      output = genfromtxt(fname, **kwargs)
    /anaconda3/lib/python3.6/site-packages/nilearn/datasets/func.py:1717: ResourceWarning: unclosed file <_io.TextIOWrapper name='/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/keys_confounds.json' mode='r' encoding='UTF-8'>
      files_keys_con = open(csv_keys_con, 'r').read()
    /anaconda3/lib/python3.6/site-packages/nilearn/datasets/func.py:1718: ResourceWarning: unclosed file <_io.TextIOWrapper name='/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/keys_phenotypic_data.json' mode='r' encoding='UTF-8'>
      files_keys_phen = open(csv_keys_phen, 'r').read()

```python
#This cell performs group spatial ica decomposition on the dataset. It narrows it down to the top
#100 components.
from nilearn.decomposition import CanICA

canica = CanICA(n_components=100, smoothing_fwhm=10.,
                threshold=3., verbose=10, random_state=0)
canica.fit(file_paths)

# Retrieve the independent components in brain space. Directly
# accesible through attribute `components_img_`. Note that this
# attribute is implemented from version 0.4.1. For older versions,
# see note section above for details.
components_img = canica.components_img_
# components_img is a Nifti Image object, and can be saved to a file with
# the following line:
#components_img.to_filename('canica_resting_state.nii.gz')
```

    [Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    0.2s remaining:    0.0s

    [MultiNiftiMasker.fit] Loading data from [/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040000.nii.gz, /Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040001.nii.gz, /Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/f
    [MultiNiftiMasker.fit] Computing mask

    [Parallel(n_jobs=1)]: Done   2 out of   2 | elapsed:    0.4s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   3 out of   3 | elapsed:    0.6s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   4 out of   4 | elapsed:    1.0s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   5 out of   5 | elapsed:    1.3s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   6 out of   6 | elapsed:    1.4s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   7 out of   7 | elapsed:    1.6s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   8 out of   8 | elapsed:    1.8s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done 145 out of 145 | elapsed:   22.1s finished

    [MultiNiftiMasker.transform] Resampling mask
    [CanICA] Loading data
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040000.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040001.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040002.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040003.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040004.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040005.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040006.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040007.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040008.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040009.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040010.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040011.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040012.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040013.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040014.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040015.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040016.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040017.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040018.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040019.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040020.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040021.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040022.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040023.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040024.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040025.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040026.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040027.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040028.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040029.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040030.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040031.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040032.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040033.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040034.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040035.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040036.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040037.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040038.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040039.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040040.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040041.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040042.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040043.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040044.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040045.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040046.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040047.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040048.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040049.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040050.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040051.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040052.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040053.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040054.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040055.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040056.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040057.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040058.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040059.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040060.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040061.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040062.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040063.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040064.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040065.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040066.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040067.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040068.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040069.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040071.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040072.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040073.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040074.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040076.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040077.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040078.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040079.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040080.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040081.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040082.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040084.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040085.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040086.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040087.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040088.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040089.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040090.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040091.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040092.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040093.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040094.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040095.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040096.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040097.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040098.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040099.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040100.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040101.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040102.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040103.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040104.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040105.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040106.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040107.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040108.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040109.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040110.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040111.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040112.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040113.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040114.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040115.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040116.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040117.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040118.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040119.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040120.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040121.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040122.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040123.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040124.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040125.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040126.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040127.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040128.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040129.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040130.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040131.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040132.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040133.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040134.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040135.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040136.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040137.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040138.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040139.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040140.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040141.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040142.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040143.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040144.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040145.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040146.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals
    [MultiNiftiMasker.transform_single_imgs] Loading data from Nifti1Image('/Users/KJP/Desktop/neural nets/Cobre Dataset2/cobre/fmri_0040147.nii.gz')
    [MultiNiftiMasker.transform_single_imgs] Smoothing images
    [MultiNiftiMasker.transform_single_imgs] Extracting region signals
    [MultiNiftiMasker.transform_single_imgs] Cleaning extracted signals

    [Parallel(n_jobs=1)]: Done   1 out of   1 | elapsed:    5.3s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   2 out of   2 | elapsed:   10.1s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   3 out of   3 | elapsed:   15.5s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   4 out of   4 | elapsed:   17.8s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   5 out of   5 | elapsed:   19.5s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   6 out of   6 | elapsed:   22.6s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   7 out of   7 | elapsed:   24.6s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   8 out of   8 | elapsed:   27.5s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done   9 out of   9 | elapsed:   29.8s remaining:    0.0s
    [Parallel(n_jobs=1)]: Done  10 out of  10 | elapsed:   31.9s finished
    /anaconda3/lib/python3.6/site-packages/scipy/stats/stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.
      return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval

```python
#Visualize the ica spatial components
from nilearn.plotting import plot_prob_atlas

# Plot all ICA components together
plot_prob_atlas(components_img, title='All ICA components')
```

```python
# Transform files to their ica components
component_files = canica.transform(file_paths)
```

```python
# Convert from list to np array
component_files = np.array(component_files)
```

```python
# Make training and testing input vectors
XData = component_files
YData = np.load('/Users/KJP/Desktop/neural nets/Codes/YData.npy')
XData -= XData.mean()
XData /= XData.max()
x_train = XData[:115]       #[1:143:2]  these commented out are other options to split data 50 50
x_test = XData[115:]         #[0:144:2]
y_train = YData[:115]         #[1:143:2]
y_test = YData[115:]          #[0:144:2]
x_train = x_train.reshape(x_train.shape[0], x_train.shape[1]*x_train.shape[2])
x_test = x_test.reshape(x_test.shape[0], x_test.shape[1]*x_test.shape[2])
display(x_train.shape)
display(y_train.shape)
display(x_test.shape)
display(y_test.shape)
```

```python

```

```python
input_dim=15000
output_dim=2
# Multi-layer net with ReLU hidden layer
model = keras.models.Sequential()
# Here we make the hidden layer (size 2) with a ReL
# activation function, but also initialize the bias
# weights in the network to a constant 0.1
model.add(keras.layers.Dropout(0.2, input_shape=(input_dim,)))
model.add(keras.layers.Dense(1000,activation='relu',
                            bias_initializer=keras.initializers.Constant(0.1)))
model.add(keras.layers.Dropout(0.1))
model.add(keras.layers.Dense(500,input_dim=input_dim,activation='relu',
                            bias_initializer=keras.initializers.Constant(0.1)))
model.add(keras.layers.Dropout(0.1))
model.add(keras.layers.Dense(100,activation='relu', bias_initializer=keras.initializers.Constant(0.1)))

# Output layer (size 1), sigmoid activation function
model.add(keras.layers.Dense(output_dim,activation='softmax'))
# Compile as above (default learning rate and other
# hyperparameters for the Adam optimizer).
model.compile(loss='categorical_crossentropy',optimizer=keras.optimizers.Adam(lr=0.00002), metrics=['accuracy'])
# Display the model
print(model.summary())
```

    _________________________________________________________________
    Layer (type)                 Output Shape              Param #
    =================================================================
    dropout_63 (Dropout)         (None, 15000)             0
    _________________________________________________________________
    dense_85 (Dense)             (None, 1000)              15001000
    _________________________________________________________________
    dropout_64 (Dropout)         (None, 1000)              0
    _________________________________________________________________
    dense_86 (Dense)             (None, 500)               500500
    _________________________________________________________________
    dropout_65 (Dropout)         (None, 500)               0
    _________________________________________________________________
    dense_87 (Dense)             (None, 100)               50100
    _________________________________________________________________
    dense_88 (Dense)             (None, 2)                 202
    =================================================================
    Total params: 15,551,802
    Trainable params: 15,551,802
    Non-trainable params: 0
    _________________________________________________________________
    None

```python
batch_size = 100
epochs = 150
history = model.fit(x_train, y_train,
    batch_size=batch_size,
    epochs=epochs,
    verbose=0,
    validation_split=0.2,
    callbacks=[TQDMNotebookCallback()])
```

    HBox(children=(IntProgress(value=0, description='Training', max=150, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 0', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 1', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 2', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 3', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 4', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 5', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 6', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 7', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 8', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 9', max=92, style=ProgressStyle(description_width='init…

    HBox(children=(IntProgress(value=0, description='Epoch 10', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 11', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 12', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 13', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 14', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 15', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 16', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 17', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 18', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 19', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 20', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 21', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 22', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 23', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 24', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 25', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 26', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 27', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 28', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 29', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 30', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 31', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 32', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 33', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 34', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 35', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 36', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 37', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 38', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 39', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 40', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 41', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 42', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 43', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 44', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 45', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 46', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 47', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 48', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 49', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 50', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 51', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 52', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 53', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 54', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 55', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 56', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 57', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 58', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 59', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 60', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 61', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 62', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 63', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 64', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 65', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 66', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 67', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 68', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 69', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 70', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 71', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 72', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 73', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 74', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 75', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 76', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 77', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 78', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 79', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 80', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 81', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 82', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 83', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 84', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 85', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 86', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 87', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 88', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 89', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 90', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 91', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 92', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 93', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 94', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 95', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 96', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 97', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 98', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 99', max=92, style=ProgressStyle(description_width='ini…

    HBox(children=(IntProgress(value=0, description='Epoch 100', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 101', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 102', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 103', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 104', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 105', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 106', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 107', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 108', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 109', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 110', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 111', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 112', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 113', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 114', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 115', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 116', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 117', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 118', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 119', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 120', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 121', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 122', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 123', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 124', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 125', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 126', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 127', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 128', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 129', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 130', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 131', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 132', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 133', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 134', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 135', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 136', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 137', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 138', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 139', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 140', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 141', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 142', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 143', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 144', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 145', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 146', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 147', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 148', max=92, style=ProgressStyle(description_width='in…

    HBox(children=(IntProgress(value=0, description='Epoch 149', max=92, style=ProgressStyle(description_width='in…

```python
plt.figure()
# summarize history for accuracy
plt.subplot(211)
plt.plot(history.history['acc'])
plt.plot(history.history['val_acc'])
plt.title('model accuracy')
plt.ylabel('accuracy')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
# summarize history for loss
plt.subplot(212)
plt.plot(history.history['loss'])
plt.plot(history.history['val_loss'])
plt.title('model loss')
plt.ylabel('loss')
plt.xlabel('epoch')
plt.legend(['train', 'test'], loc='upper left')
plt.tight_layout()
plt.show()
```

```python
score = model.evaluate(x_test, y_test, verbose=0)
print('Test loss:', score[0])
print('Test accuracy:', score[1])
```

    Test loss: 0.882283091545105
    Test accuracy: 0.699999988079071

```python

```

```python

```

FMRI Preprocessing/ICA Multilayer Net.ipynb