View full-text article in PMC Sensors (Basel). 2017 Sep 8;17(9):2064. doi: 10.3390/s17092064 Search in PMC Search in PubMed View in NLM Catalog Add to search Copyright and License information © 2017 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/). PMC Copyright notice 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