Skip to main content
. 2018 May 24;18(6):1698. doi: 10.3390/s18061698
Algorithm 1 Pseudo-code of individual functions
1: function Extract feature(Secog,X)
    input: Secog=20s;allchannels
    output: XRK
2:         X = x1,x2,xN
3: end function
 
 
 
4: function Classify(X,Y,V,U)
    input: XRK
    output: Y,V,U
5:         for each sample in X do
6:                 (Y,V)=θ(X) (acquire soft and crisp labels)
7:         end for
8:         return U = XPY|V<80%
                                             (obtain ambiguous samples)
9: end function
10: function Threshold(Y^,PA)
11:        if 70%ofY^isclassifiedaspre-ictalstate then
12:                return PA = 1
13:        else
14:                return PA = 0
15:        end if
16: end function

17: function Active learner(X,UY,V,A)
      input: X,U,Y,V
      output: A
18:        θBGMM=BGMMX,U,Y,V (Obtain BGMM model)
19:        for each sample in U do
20:                Z,p(Z)=E_MθBGMMX,Y,V
21:        end for
22:        A=SamplesinZwithsmallest|p(Z)|
23: end function