Skip to content

Commit

Permalink
*Fix iteration matching in icaDim.m
Browse files Browse the repository at this point in the history
  • Loading branch information
glasserm committed Nov 11, 2019
1 parent e275bde commit 08978ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ICAFIX/scripts/icaDim.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
%Variables
Out.VNDIM=VN; %Variance Normalization Dimensionality initially set to 1
lnb = 0.5; %Lower noise bound for Golden Section Search
stabThresh = Iterate; %How many iterations meeting dimThresh criterion (1 for VNDIM=1 results, 2 for legacy converged results, -1 for new converged results, >2 for fixed iterations)
stabThresh = Iterate; %How many iterations meeting dimThresh criterion (1 for VNDIM=1 results, 2 for legacy converged results, -1 for new converged results, >3 for fixed iterations)

if Iterate < 0
stabThresh=0.25; %Difference in running average
priordimavg=0;
end

if Iterate > 2
if Iterate > 3
stabThresh=Iterate; %Difference in running average
priordimavg=0;
end
Expand Down Expand Up @@ -163,7 +163,7 @@
end
end

if Iterate > 2
if Iterate > 3
stabCount=c;
priordimavg = mean(Out.VNDIM(4:end));
disp([' dimavg: ' mat2str(priordimavg)]);
Expand All @@ -172,7 +172,7 @@
if Iterate < 0
Out.calcDim=round(priordimavg);
end
if Iterate > 2
if Iterate > 3
Out.calcDim=round(mean(Out.VNDIM(4:end)));
end

Expand Down

0 comments on commit 08978ab

Please sign in to comment.