Skip to main content
. 2022 Aug 4;16:973959. doi: 10.3389/fnhum.2022.973959

ALGORITHM 1.

Training and optimization procedures of EEG-fNIRS fusion based on our proposed framework.

Inputs: time domain features of EEG E1 = {(E1xm, ym)}; frequency domain features of EEG E2 = {(E2xm, ym)}; time domain features of fNIRS F1 = {(F1xm, ym)}; frequency domain features of fNIRS F2 = {(F2xm, ym)}; number of primary learning models T; primary learning models λ1, λ2, λ3, λ4; secondary learning model λ
Outputs: trained model M based on our proposed method; predicted labels L;
1. set E = E1 ∪ E2 = {(Exm, ym)},
2.   F = F1 ∪ F2 = {(Fxm, ym)}% Combine the time and frequency domain
                 features
3. D1 = E’, D2 = F’% feature selection using ASO algorithm for E and F:
4. for t = 1, …, T:
5.   ht1 = λt (D1)% Train a primary individual learner ht1 and ht2 by
          applying the primary
6.   ht2 = λt (D2)% learning models
7. end for
8. D’ = ∅; % Generate a new data set
9. for i = 1,…,k:% k-flod cross-validation
10. for t = 1,…,T:
11.   ht1’ = ht1 (E1xi), ht2’ = ht2 (F1xi),
12.   ht = ht1’ ∪ ht2
13.   Zit = ht (xi)
14. end for
15. D’ = D’ ∪ ((Zi1, Zi2, …, ZiT), yi)
16. end for
17. h’ = λ (D’);% Train the secondary learner h’ by applying the secondary
         learning
18.   % algorithm λ to the new data set D
19. M (x) = h’ (h1 (x), h1 (x),…, hT (x))
20. return predicted labels L and trained model M based on our proposed
     method