Skip to main content
. 2017 Jul 31;11:68. doi: 10.3389/fncom.2017.00068

Algorithm 3.

Statistical approach for choosing 〈ropt

1: inputs: Jsym ← 〈Jsym〉 averaged across jackknives, pthres, the number of random matrices to generate M
2: initialization: calculate the vector of eigenvalues β ← eig(Jsym) arranged in descending order of magnitude, initialize empty vector ζ ← ∅, 〈ropt〉 ← 0
3:  
4: for m = 1 to M do
5:       J^ randomly sample D(D + 1)/2 elements of ±Jsym with uniform
6:                 probability and generate a D × D symmetric matrix.
7:       ζ[ζ, |min(eig(J^))|, max(eig(J^))]                                                                             ⊳ Append magnitude of maximum and minimum eigenvalues of J^
8:  
9: for k = 1 to D do
10:       p12Mm=12MH(ζm-|βk|)                                                                                                                               ⊳ H(·) is the Heaviside step function
11:       if ppthres then
12:                 break
13:            else
14:                 〈ropt〉 ← k
15:  
16: output:ropt