Supporting AIS only calculation in flocking demo

This commit is contained in:
jlizier 2022-09-08 11:27:27 +10:00
parent 6dc6b8fa11
commit 26e3cd8afb
2 changed files with 13 additions and 1 deletions

View File

@ -106,3 +106,6 @@ properties.jidt.autoDynamicCorrelationExclusion = true; % Exclude nearest neighb
properties.aisNumSurrogates = 0; % Number of surrogate calculations to run for AIS (just to see the noise floor. 0 means skip)
properties.teNumSurrogates = 0; % Number of surrogate calculations to run for TE (just to see the noise floor. 0 means skip)
% Exit the analysis after calculating the AIS (i.e. don't compute TE)
properties.computeAISOnly = false;

View File

@ -118,7 +118,7 @@ if (isfield(properties, 'kRange') || isfield(properties, 'tauRange'))
properties.tau = maxAIStau;
properties.ais = maxAIS;
properties.destSamplesOnly = false;
fprintf('*** Optmised k=%d and tau=%d (giving AIS=%.4f)\n', properties.k, ...
fprintf('*** Optmised k=%d and tau=%d (giving AIS=%.4f - see above for null distribution for these parameters)\n', properties.k, ...
properties.tau, properties.ais);
else
% Hard coded embedding parameters: compute the AIS to be saved anyway :
@ -140,6 +140,15 @@ else
fprintf('*** Hard-coded values for k=%d and tau=%d to be used (giving AIS=%.4f)\n', properties.k, ...
properties.tau, properties.ais);
end
% Check whether to continue to TE calculations:
if (~isfield(properties, 'computeAISOnly'))
properties.computeAISOnly = false;
end
if (properties.computeAISOnly)
fprintf('Finishing after AIS calculation only, as requested.\n');
return;
end
% Step 2: automatically select the correct lag if required:
teNumSurrogates = properties.teNumSurrogates; % Store this for later, turn it off now