Batch Script
Batch script is an alternative way to run the group ICA. We have provided two
example input files like 'Input_eeg_data_subjects_1.m' and
'Input_eeg_data_subjects_2.m' in folder
icatb/toolbox/eegiftv1.0a/icatb_eeg_batch_files. The function for running the
batch file is 'icatb_batch_file_run'. Type icatb_batch_file_run(inputFile) at
the MATLAB command prompt where inputFile is the full file path of the input
file. We explain below the parameters in the input file.
- modalityType - Modality type. Enter 'EEG'.
- which_analysis - Options are 1 and 2. If you select 2, group ICA is run
using ICASSSO. The following are the options available:
- icasso_opts.sel_mode - Selection mode. Options are 'randinit', 'bootstrap'
and 'both'.
- icasso_opts.num_ica_runs - Number of times you want ICA to be run.
- dataSelectionMethod - Options are 1,
2, 3 and 4. Each option is explained below:
- 1 - Data will be selected automatically if you specify the root folder for
subjects and sessions, file pattern and a flag. Options for flag are
'data_in_subject_folder' and 'data_in_subject_subfolder'.
- 'data_in_subject_subfolder' - Data is selected from the subject
sub-folders. Number of sessions is equal to the number of sub-folders containing
the specified file pattern.
- 'data_in_subject_folder' - Data is selected from the subject folders. The
number of sessions is 1 and the number of subjects is equal to the number of
subject folders containing the specified file pattern.
- 2 - This option can be used when all the data is not in one directory. You
need to specify the data directory for each subject and session followed by file
pattern. The required variables are selectedSubjects and numOfSess.
selectedSubjects contains the arbitrary names of subjects (s1 refers to
subject1, s2 refers to subject 2, etc) and numOfSess contains the number of
sessions. Subject 1 session 1 data information must be entered in variable s1_s1
and subject 2 session 2 information must be entered in variable s1_s2.
-
3 - This option uses regular expressions to get the data set directories. The
required variables are as follows:
- input_directory_name - Full path of the directory where the subjects and
sessions are located.
- subject_dir_regexp - Regular expression used for matching subject
directories. This variable accepts nested paths.For example, to match "sessions" directory in the "Oddball" directory, you can use Odd\w+; ^sessions$ regular expression where semi-colon is used as a delimiter. . If there are no
subject directories inside the input directory, leave it as empty.
- session_dir_regexp - Regular expression used for getting the session
directories inside the subject directories. Unlike subject_dir_regexp variable
this cannot contain nested paths. If there are no session directories, leave
this as empty.
- data_file_pattern - File pattern used for getting data. Use wild card not
regular expressions.
-
4 - This option is useful when you want to specify the file names directly. Specify file names in input_data_file_patterns variable. File patterns must be in a cell array of dimensions equal to number of subjects and sessions. Each new subject must be entered in a new row.
- outputDir - Output directory of the analysis.
- prefix - All the output files will be pre-pended with this prefix.
- pcaType - Specify PCA type.
- 1 - Standard
- 2 - Expectation Maximization
- 3 - SVD
-
pca_opts - Optional parameters for PCA.
-
Standard PCA:
- pca_opts.stack_data - Options are as follows:
- 'Yes' - Data sets are stacked to compute covariance matrix.
This option assumes that there is enough RAM to stack the data sets and for computing the covariance matrix.
Full storage of covariance matrix is used.
- 'No' - A pair of data sets are loaded at a time to compute
covariance matrix. This option uses less memory usage but slower
than the other option. You also have the option to store only the
lower triangular portion of the covariance matrix (packed storage)
when using this option.
- pca_opts.storage - Options are 'Full' and 'Packed'. Packed
storage scheme uses only lower triangular portion of symmetric
matrix to compute eigen values.
- pca_opts.precision - Options are 'Double' and 'Single'. Single
precision is accurate up to 7 digits after decimal place and uses
50\% less memory usage when compared to double precision.
- pca_opts.eig_solver - Options are 'Selective' and 'All'. These
options will be used only when you use packed storage scheme. Use
option 'All' only when there are convergence issues with the option
'Selective'.
- Expectation Maximization:
- pca_opts.stack_data - Options are as follows:
- 'Yes' - This option assumes that there is enough RAM to stack the data sets.
- 'No' - A data-set is loaded at a time to compute the transformation matrix.
- pca_opts.precision - Options are 'Double' and 'Single'.
- pca_opts.tolerance - Enter stopping tolerance. Default is 1e-4.
- pca_opts.max_iter - Enter maximum number of iterations to use.
- backReconType - Options are 1, 2 and 3.
- 1 - Regular
- 2 - Spatial-temporal regression
- 3 - GICA3
- 4 - GICA
- numReductionSteps - The number of reduction steps used and is dependent on
the number of data-sets used. A maximum of three reduction steps is used.
- numOfPC1 - Number of PC for reduction step 1.
- numOfPC2 - Number of PC for reduction step 2.
- numOfPC3 - Number of PC for reduction step 3.
- scaleType - Options are 0, 1, 2, 3 and 4.
- 0 - No scaling
- 1 - Scale to original data
- 2 - Z-scores
- 3 - Scaling in topographies
- 4 - Scaling in maps and topographies
- algoType - Currently there are 12 ICA algorithms available in the EEGIFT
toolbox. The algorithms are as follows:
- 1 - Infomax
- 2 - FastICA
- 3 - ERICA
- 4 - SIMBEC
- 5 - EVD
- 6 - JADE OPAC
- 7 - AMUSE
- 8 - SDD ICA
- 9 - Radical ICA
- 10 - Combi
- 11 - ICA-EBM
- 12 - FBSS