Algorithm 3.
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: | randomly sample D(D + 1)/2 elements of ±Jsym with uniform |
6: | probability and generate a D × D symmetric matrix. |
7: | ⊳ Append magnitude of maximum and minimum eigenvalues of |
8: | |
9: | for k = 1 to D do |
10: | ⊳ H(·) is the Heaviside step function |
11: | if p ≥ pthres then |
12: | break |
13: | else |
14: | 〈ropt〉 ← k |
15: | |
16: | output: 〈ropt〉 |