Skip to main content
. 2022 Jun 23;16:851827. doi: 10.3389/fnins.2022.851827

Algorithm 1.

Cross-validation procedure for the DDR CCA analysis

1. Step 1: Split the original SM and BM into five roughly equal-sized groups without breaking the families, using four as the training set (Xin, Yin) and the other as the test set (Xout and Yout).
2. Step 2: Apply DDR to the training set and use the rotated principal loadings from the training set to construct the rotated principal components for the test set (RC~Xout and RC~Yout in Figure 3).
3. Step 3: Feed both DDR-reduced training set from SM and BM (RCXin and RCYin in Figure 3) to CCA to obtain canonical variables Pin and Qin, canonical weights Ain and Bin and canonical correlations Rin.
4. Step 4: Construct canonical variables for the test set using canonical weights from the training set using Equation (11)
P~out=XoutAin,Q~out=YoutBin. (11)
Step 5: Calculate correlations between P~in and Q~in as the cross-validated canonical correlations R~in.
5. Step 6: Apply permutation testing to test the number of significant canonical variables for Pin and Qin, and P~in and Q~in with 10,000 permutations.
6. Step 7: Compute the assessment measurements such as VE and canonical loadings.
7. Step 8: Go to Step 1 to start the next fold.