Skip to main content
. 2023 Jul 16;23(14):6434. doi: 10.3390/s23146434
Algorithm 5 CCA based denoising of EEG signal [72]
  • Input: X: EEG data matrix

  • Input: Y: matrix of auxiliary variables (e.g., EOG or ECG data)

  • Output: Z: matrix of cleaned EEG data
    • Center and whiten the X.
    • Initialize the weight matrices A and B randomly.
    • repeat
      •     Compute the canonical weights wa by maximizing the correlation between X and Y with respect to A. ▹wa: weights used to linearly combine the EEG signal for one component
      •     Compute the canonical weights wb by maximizing the correlation between X and Y with respect to B.▹wb:weights used to linearly combine the auxiliary signal for one component
      •     Update the weight matrices A and B.
    • until convergence
    • Compute the cleaned data as Z=ATX.
    • return Z