Skip to main content
. 2017 Sep 8;17(9):2064. doi: 10.3390/s17092064
Algorithm 2 Context-based classification Algorithm
  • 1: Initialize the data buffer {Result1,Result2,,Result2k+1}

  • 2: while R is input from H-SVM do

  • 3: {

  • 4:  If n < 2k + 2 then

  • 5:   Resultn=R(n=1,2,,2k+1)

  • 6:   RWT=Rt

  • 7:  else

  • 8:   {Mode1,Mode2,}=MajorityOf{Result1,Result2,,Result2k+1}

  • 9:     if Resultk+1{{Mode1},{Mode2},} then

  • 10:       RWt=Resultk+1=Rt

  • 11:     else

  • 12:       RWt=Mode1

  • 13: }

  • 14: end while