Gareth Paul Jones
3rd place Melbourne University AES/MathWorks/NIH Seizure Prediction
2016
See also:
This code is designed to process the raw data from Melbourne University AES/MathWorks/NIH Seizure Prediction, train a seizureModel (train.m), then predict seizure occurrence from a new test set (predict.m).
The raw data contains 16 channel inter-cranial EEG recordings from 3 patients. It's split in to interictal (background) periods and preictal (before-seizure) periods.
Various feautres are extracted from the raw data, inlcuding:
These features are extracted with various windows sizes (240, 160, and 80s in the 3rd place submission) and are combined in to a single data set before training the models. Processed features are saved to disk for faster subsequent loading.
Two models are fit to the processed data:
These models are handled by the seizureModel object and are fit to all the data, rather than individual models being trained for each subject. The predictions of each model are ensembled with a simple mean, which produces a considerably better score than either model alone.
Training and prediction stages can be run independently from their respective scripts, or together from testRun.m. If running from testRun.m paths need to be set in predict.m and train.m first. Warning: testRun.m is designed to run entirely from scratch and deletes all .mat files from the working directory when it starts!
Both predict.m and train.m expect the same directory structure as provided for the competition, and training is specifically written to handle the temporal relationships in this dataset - it would need modification to work correctly with new data.
Set paths the paths params.paths.dataDir and params.paths.or in predict.m and train.m
Run train.m
Run predict.m
Processed features and final submission file are saved in to working directory to save time on subsequent runs.
train.m script:
predict.m script:
featuresObject