Skip to main content
. 2018 Apr 4;9:325. doi: 10.3389/fphys.2018.00325

Algorithm 1.

Procedures of change detection.

  • STEP 1 Set the value of λ in Eq. (13) for change decision making and initialize the set of changes C=;

  • STEP 2 Set beginning time t0 = 1 for martingale construction and initialize martingale value M(t0) = 1;

  • STEP 3 Set time t = t0 + 1 for martingale starting;

  • STEP 4 Calculate the martingale value by Eq. (8);

  • STEP 5 Determine the present time by Eq. (13): if it rejects the null hypothesis H0 via the threshold λ in Eq. (13), add the corresponding time to C and set M(t) = 1, t0 = t, t = t0 + 1 successively. After that, goto STEP 4; otherwise, update t = t + 1 and then goto STEP 4;

  • STEP 6 The iterative process stops when the monitoring EEG signals Y has been processed completely or at a stopping time.