Commit 2d75d117 authored by Sam Harrison's avatar Sam Harrison
Browse files

Normalise neural timecourse amplitudes after correlation

The mixing can induce amplitude changes, so we renormalise here before
thresholding (and then add explicit variability later).
parent 1fb28723
......@@ -127,9 +127,11 @@ for s = 1:params.S
%figure(); imagesc(An{s}{r}); colorbar()
%figure(); imagesc(corr(An{s}{r}'), [-1 1]); colorbar()
% Normalise amplitudes: mixing to induce correlations can change these
An{s}{r} = An{s}{r} ./ std(An{s}{r}')';
%Assume timecourses are Gaussian and find expected value of
%percentile given by p
An{s}{r} = An{s}{r} ./ std(An{s}{r}(:));
mu = norminv([options.An.p/2 1-options.An.p/2], ...
0, std(An{s}{r}(:)));
%Sparsify
......
......@@ -286,7 +286,6 @@ for n = 1:params.nRepeats
D = generateData(PA, params, options, plotNow);
% Calculate netmats
pcAn = calculateNetmats(An, params);
pcA = calculateNetmats(A, params);
%Finally, add a global rescaling such that all scans are overall
......@@ -373,10 +372,6 @@ for n = 1:params.nRepeats
scores.ICA_DR(n) = calculateDecompositionAccuracy( ...
P, icadr_P, A, icadr_A, pcA, icadr_pcA, params);
% Correlations compared to 'neural' process
%[~, ~, scores.ICA_DR.pcAn(n,:,:)] ...
% = calculateDecompositionAccuracy( ...
% P, icadr_P, A, icadr_A, pcAn, icadr_pcA, params);
catch
warning('MELODIC run failed.');
end
......@@ -393,9 +388,8 @@ for n = 1:params.nRepeats
scores.PROFUMO(n) = calculateDecompositionAccuracy( ...
P, pfm_P, A, pfm_A, pcA, pfm_pcA, params);
% Correlations compared to 'neural' process
%[~, ~, scores.PROFUMO.pcAn(n,:,:)] ...
% = calculateDecompositionAccuracy( ...
% P, pfm_P, A, pfm_A, pcAn, pfm_pcA, params);
%pcAn = calculateNetmats(An, params);
% Feed `pcAn` instead of `pcA`
% Dual-reg from PFM group maps
......@@ -404,10 +398,6 @@ for n = 1:params.nRepeats
scores.PFM_DR(n) = calculateDecompositionAccuracy( ...
P, pfmdr_P, A, pfmdr_A, pcA, pfmdr_pcA, params);
% Correlations compared to 'neural' process
%[~, ~, scores.PFM_DR.pcAn(n,:,:)] ...
% = calculateDecompositionAccuracy( ...
% P, pfmdr_P, A, pfmdr_A, pcAn, pfmdr_pcA, params);
catch
warning('PROFUMO run failed.');
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment