-
Notifications
You must be signed in to change notification settings - Fork 1
/
mCAP_inputs.m
60 lines (55 loc) · 2.21 KB
/
mCAP_inputs.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
clear all
close all
%%%
serverdef='media/miplab-nas2/';
%% 1. Path definition
SPM_path=fullfile(filesep,serverdef,'Code','Younes','spm12');
TbCAPs_path=fullfile('./functions/tbCAPs_functions');
mCAPs_path=fullfile('./functions');
%% 2. Data addressing
data_path=fullfile('./data/data_test.mat'); % data should be saved as describe below
%A. seedmask = A logical vector of number of voxels of whole brain included
% in the study where 1 indicates the voxel within the initial seed -
% bilateral thalami in case of test data. (Dimension : nVox x 1)
%B. TC = Compatible with the work of Bolton.T.W et al 2019. A cell sturcture of timecourses (Dimension: 1 x nParticipants)
%which each cell contains a matri of preprocessed BOLD time-course for
%whole brain (Dimension : lenght_of_timecourse x nVox)
%C. FD = Compatible with the work of Bolton.T.W et al 2019.A matrix of
%frame-wise displacment values (Dimension : lenght_of_timecourse x nParticipants)
out_dir=fullfile('./result_test');
%% 3. Specifying running options
%%% Saving all results
save_all=1;
%%% Doing parallel processing
% Paralell processing option for running the Kmeans iterations faster
parallel_processing=0; % use parfor for Kmeans
numb_pool=7; % number of cores to use in parfor
%% 3. Specifying the CAPs and Kmeans parameters
% Selected K
ik=8;
% Max iteration number
max_iteration=6;
% The distance define as convergence across seeds
convergence_seed_value=0.005;
% Threshold above which to select frames
T =1;
% Threshold of FD above which to scrub out the frame and also the t-1 and
% t+1 frames
Tmot = 0.5;
% Number reps and iterations for Kmeans
N = 40;
n_rep=100;
n_iter=300;
% Copyright 2023 Farnaz Delavari
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS,
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
% See the License for the specific language governing permissions and
% limitations under the License.