Skip to main content
. 2022 Dec 30;13(1):75. doi: 10.3390/brainsci13010075
Algorithm 1 bootstrap (X,r,α,n,nα,θ)
  • X→EEGtrials

  • r→no.oftrialstoaverage

  • α→[α1,α2,…,αc]categoryspecificdropoutrates

  • n→no.ofiterations

  • nα→predeterminedintervaltodroptrials

  • θ→[θ1,θ2,…,θc]categories

  • X^←[]

  • forθi in θ do

  •     xθi←X[θi]

  •     mi←r×αi

  •     for j=1 to n do

  •           if |xθi|≤r then

  •                 X^[j]←1|xθi|∑xk∈xθixk

  •         end if

  •         x^←sample(xθi,r)                  ▹ sample r trials from xθi

  •         X^[j]←1r∑k=0rx^k

  •         if jremnα=0 then

  •                xm=sample(x^,m)                  ▹ select mi trials to drop

  •                xθi=drop(xθi,xm)                  ▹ drop selected xm trials

  •         end if

  •         if xθi=⌀ then

  •                break

  •         end if

  •     end for

  • end for