We propose an automated method for the analysis of epileptic EEG data employing the random forests (RFs) algorithm. Feature extraction is performed using a discrete wavelet transform to give time-frequency representations, from which statistical features based on the wavelet decompositions are formed and used for training and classification. We show that RFs can be applied for the classification of ictal, inter-ictal and healthy EEG with a high level of accuracy, with 99% sensitivity and 93.5% specificity for classifying ictal and inter-ictal EEG, 90.6% sensitivity and 95.7% specificity for the windowed data and 93.9% sensitivity for seizure onset classification.


The proposed method consists of EEG signal pre-processing, feature extraction, classifier training and classification. Two datasets are investigated for classification. Dataset 1 is segmented into ictal, inter-ictal and normal EEG, while dataset 2 is taken from 24 epilepsy patients. The former contains artifact free data taken during a short recording session and is chosen for the purposes of evaluating the discriminative ability of random forests when presented with such ideal data. The latter contains a more varied collection of samples in regards to recoding environments and provides a more challenging task for the classifier.

High amplitude slow-wave activity indicative of an epileptic seizure.
Similar slow-wave activity to a seizure, however no seizure is present.
  • Experimental results

Sensitivity for seizure onset is calculated as the number of seizures identified as a percentage of the total number available. In other cases, sensitivity and specificity are calculated based on overall classification (dataset 1) or window classification (dataset 2).

Final results for dataset 1.
Final results for dataset 2.

The results in the tables above show that random forests (RF) is an effective tool for the classification of epileptic EEG. Moreover, online RF implementation may lead to real-time classification.