Research Article
DWT-Net: Seizure Detection System with Structured EEG Montage and Multiple Feature Extractor in Convolution Neural Network
Algorithm 1. Algorithm for state machine post-processor
| Require:Pseizure, Pnormal, Pup | | Output:Resultn, n =1,2,… | | 1: Initialize System State State ⇐ Negative | | 2: while New EEG window do | | 3: ifState == Negativethen | | 4: ifPseizure < Pnormalthen | | 5: next State ⇐ Negative | | 6: Resultn ⇐ Normal | | 7: else | | 8: next State ⇐ Positive | | 9: Resultn ⇐ Epileptic | | 10: end if | | 11: end if | | 12: ifState == Positivethen | | 13: ifPseizure + Pup < Pnormalthen | | 14: next State ⇐ Smooth | | 15: Resultn ⇐ Normal | | 16: else | | 17: next State ⇐ Positive | | 18: Resultn ⇐ Epileptic | | 19: end if | | 20: end if | | 21: ifState == Smooththen | | 22: ifPseizure + Pup < Pnormalthen | | 23: next State ⇐ Negative | | 24: Resultn ⇐ Normal | | 25: Resultn−2 ⇐ Normal | | 26: else | | 27: next State ⇐ Positive | | 28: Resultn ⇐ Positive | | 29: Resultn−1 ⇐ Positive | | 30: end if | | 31: end if | | 32: end while |
|
Algorithm 1. Algorithm for state machine post-processor |