{'fraction_non_alphanumeric': 0.023194168323392977, 'fraction_numerical': 0.015904572564612324, 'mean_word_length': 5.317991631799163, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
ScoreNet: A Neural network-based post-processing model for identifying epileptic seizure onset and offset in EEGs

We design an algorithm to automatically detect epileptic seizure onsets and offsets from scalp EEGs. The proposed scheme consists of two sequential steps: detecting seizure episodes from long EEG recordings, and determining seizure onsets and offsets of the detected episodes. We introduce a neural network-based model called ScoreNet to carry out the second step by better predicting the seizure probability of pre-detected seizure epochs to determine seizure onsets and offsets. A cost function called log-dice loss with a similar meaning to the F1 score is proposed to handle the natural data imbalance inherent in EEG signals signifying seizure events. ScoreNet is then verified on the CHB-MIT Scalp EEG database in combination with several classifiers including random forest, CNN, and logistic regression. As a result, ScoreNet improves seizure detection performance over lone epoch-based seizure classification methods; F1 scores increase significantly from 16–37% to 53–70%, and false positive rates per hour decrease from 0.53–5.24 to 0.05–0.61. This method provides clinically acceptable latencies of detecting seizure onset and offset of less than 10 seconds. In addition, an effective latency index is proposed as a metric for detection latency whose scoring considers undetected events to provide better insight into onset and offset detection than conventional time-based metrics.