Seizure prediction and machine learning

41
Seizure prediction and machine learning Jeff Howbert March 11, 2014

description

Seizure prediction and machine learning. Jeff Howbert March 11, 2014. Epilepsy. Group of long-term neurological disorders characterized by epileptic seizures. Seizures involve excessive, abnormal nerve discharge in cerebral cortex. Wide spectrum of severity and symptoms. - PowerPoint PPT Presentation

Transcript of Seizure prediction and machine learning

Supervised Semantic Indexing

Seizure prediction andmachine learningJeff HowbertMarch 11, 2014EpilepsyGroup of long-term neurological disorders characterized by epileptic seizures.Seizures involve excessive, abnormal nerve discharge in cerebral cortex.Wide spectrum of severity and symptoms.About 60% of patients have convulsive seizures with loss of consciousness.Frequency of episodes varies from several per day to a few per year.Underlying causes mostly obscure.Common disorder affecting 1% of worlds population.2Electroencephalography (EEG)

http://teddybrain.files.wordpress.com/2013/02/interictal-eeg-of-mesial-temporal-lobe-epilepsy.jpg

EEG of temporal lobe epilepsy

http://teddybrain.files.wordpress.com/2013/02/ictal-eeg-of-mesial-temporal-lobe-epilepsy.jpgEEG of absence seizure

http://brain.fuw.edu.pl/~suffa/Modeling_SW.htmlEpilepsy treatmentMainstay of therapy is anti-epileptic medications.Medications produce significant cognitive and physical side-effects.20 - 40% of patients continue to have seizures.Alternatives to medication mostly involve surgery.Major source of disability is anxiety over occurrence of next seizure.Often leads to self-imposed, severe limitations on physical and social activities.Seizure predictionReliable prediction (forecast) of seizures would allow patients to take prophylactic medication or withdraw to a safe place.

Relative difficulty:prediction >>> detection

Prediction is hard.Predictive signals are subtle and buried in mass of other signals.Proving the predictions are statistically better than a random model is very difficult.

NeuroVista Seizure Advisory System (SAS)Records intracranial EEG (iEEG)continuouslong-termambulatory

Output from SAS

NeuroVista SAS in human trialsStudy phasesImplantationStabilization of EEG after surgeryData collectionMinimum of 1 month and 5 lead seizuresAlgorithm training on collected dataMust satisfy performance criteria under cross-validation Advisory enablementAdvisory observation for 4 monthsProspective evaluation of advisory performanceNeuroVista SAS in human trials

13NeuroVista SAS in human trials

Given a collection of records (training set)Each record contains a set of features.Each record also has a discrete class label.Learn a model that predicts class label as a function of the values of the features.Goal: model should assign class labels to previously unseen records as accurately as possible.A test set is used to determine the accuracy of the model. Usually, the given data set is divided into training and test sets, with training set used to build the model and test set used to validate it.Classification definitionAttributes: a.k.a. features, independent variables, Classification illustrated

categoricalcategoricalcontinuousclass

TestsetTraining setModelLearn classifierPredictedclassesNeuroVista predictive algorithmsFirst generationSecond generationFeaturesspectral power based, somewhat complex??Feature resolutionone second??Discriminant functioncomplex, non-linear??iEEG recordings used for developmentshort-term human??Human trialseffective??NeuroVista predictive algorithmsFirst generationSecond generationFeaturesspectral power based, somewhat complex??Feature resolutionone second??Discriminant functioncomplex, non-linear??iEEG recordings used for developmentshort-term human??Human trialseffective??NeuroVista predictive algorithmsFirst generationSecond generationFeaturesspectral power based, somewhat complex??Feature resolutionone second??Discriminant functioncomplex, non-linear??iEEG recordings used for developmentshort-term human??Human trialseffective??NeuroVista predictive algorithmsFirst generationSecond generationFeaturesspectral power based, somewhat complexspectral power based, simplifiedFeature resolutionone secondone minuteDiscriminant functioncomplex, non-linearlogistic regressioniEEG recordings used for developmentshort-term humanlong-term canineHuman trialseffectiveuntested

Canine subjectsSubject ID (Breed)MRI BrainRecording duration, daysNumber all seizuresNumber lead seizures002MixedNormal197 *2727004MixedNormal330158007MixedNormal4518318Group totals (mean std)978(326 127)125(41.7 36.3)53(17.7 9.5)Lead seizures were defined as seizures preceded by at least 4 hours of non-seizure.

* Full record was 475 days in duration; only final 197 days used for forecasting to avoid post-surgical non-stationarities in iEEG.Specifics of iEEG records for three canines with naturally occurring epilepsy implanted with the NeuroVista Seizure Advisory System.Seizure Advisory System in canines

Implantable Leads AssemblyImplantable Telemetry UnitPersonal Advisory Devicesingle warning triggeredno seizure(false positive)repeated warnings triggeredno seizure(false positive)repeated warnings triggeredseizure occurs(true positive)onset of full seizureSeizure Advisory System in canines

single warning triggeredno seizure(false positive)repeated warnings triggeredno seizure(false positive)repeated warnings triggeredseizure occurs(true positive)onset of full seizureFull seizure record, canine subject 002

197 daysFourier transformtransform data from time domain to frequency domain

two sine wavestwo sine waves + noisefrequencyExtraction of power bands from iEEGFor each one-minute time interval (24000 samples of raw iEEG):Fourier transform on each of 16 channel EEG to give corresponding channel power spectrum (16384 frequencies)For whole record:Normalize power at each frequency in each channelFor each one-minute time interval:Segment power spectrum into bandsdelta(0.1-4 Hz) beta(12-30 Hz)theta(4-8 Hz)gamma-low (30-70 Hz)alpha(8-12 Hz)gamma-high(70-180 Hz)Create channel-band features by summing values in each band

Output: 96 power-in-band features with temporal resolution of one minuteExtraction of power bands from iEEG

Multi-channel iEEG recording(time domain)Multi-channel power spectrum(frequency domain)time windowTerminologyictalperiod of time during a seizurepreictalperiod preceding a seizurepostictalperiod following a seizureinterictaltime between seizures (neither ictal nor preictal)

Initial search for predictive algorithmSet up as standard two-label classification problemEach one-minute interval labeled as:preictal if within 90 min. preceding a seizureinterictal otherwise10-fold cross-validation with block foldsInterictal labels much more abundant than preictal labelsclass imbalance problemaddress by subsampling interictal labels so have same number as preictal labels in training setStandard classification algorithmslogistic regression, neural networks, SVMs, othersPower-in-band featuresCanine subject 002Time interval around seizure cluster 296 features (black)6 seizures (red)90 minute preictal horizon (pink shading)

6 features forchannel 1Power-in-band features

Canine subject 002Seizure cluster 2Expansion of features for channels 9-12

channel 9Classification of preictal vs. interictal

Canine subject 002Full record shownLogistic regressionTrained on all 96 featuresOutput probability of preictal in range 0.0 - 1.0

AUC-ROC = 0.826

original labels of samples preictal interictalmissingdataClassification of preictal vs. interictal

original labels of samples preictal interictalCanine subject 002Seizure cluster 2 shown

Predictive algorithm in advisory settingMust choose advisory thresholdWhen output of classifier exceeds threshold, warning is triggered.Warning has preset persistence interval (90 min.).New threshold crossing during ongoing warning extends warning.True positive:Warning begins at least 5 min. prior to seizure.Warning still in effect at time of seizure.False positive:Warning does not overlap a seizure.Predictive algorithm in advisory settingPerformance evaluated within a stack of calculationsFeature selectionClassifier trainingOver sequence of thresholds selected to produce various targeted total time in warning (TIW):Generate advisories from trained classifierGenerate advisories from chance predictor matched for TIWCompute statistics comparing performance of trained and chance predictors10-fold cross validation applied to entire stackChance predictor

Chance predictorWarning triggers generated randomly using a Poisson processWarning intervals otherwise identical to trained predictorPersistenceExtensionRules for true and false positives Poisson rate parameter adjusted to produce target time in warning Advisory performance in caninesIDTIWSn pSn-leadpn-leadFalse Positive/day0020.10.4820.00000.4820.00001.2930020.150.5930.00000.5930.00001.8180020.20.6670.00000.6670.00002.2570020.30.7410.00000.7410.00002.7920020.350.7410.00010.7410.00012.9100020.40.8890.00000.8890.00003.0740020.50.8890.00010.8890.00013.1860040.10.0000.24350.0000.60810.8110040.150.1331.00000.1251.00000.7940040.20.4670.01410.2501.00001.0790040.30.7330.00070.5000.25341.9540040.350.7330.00350.5000.46912.3350040.40.7330.01830.5000.72902.6700040.50.8000.07000.6250.74073.0260070.10.7590.00000.2220.75480.6580070.150.8190.00000.2780.55820.7910070.20.8430.00000.3890.16580.9910070.30.8920.00000.5560.04211.4270070.350.8920.00000.5560.08951.6170070.40.9040.00000.5560.22701.6950070.50.9160.00000.6110.24591.92710 of 96 PIB features (forward selection)10-fold cross-validationTIW: total time in warningSn: sensitivityp: p-valuelead: lead seizures only NeuroVista predictive algorithmsFirst generationSecond generationFeaturesspectral power based, somewhat complexspectral power based, simplifiedFeature resolutionone secondone minuteDiscriminant functioncomplex, non-linearlogistic regressioniEEG recordings used for developmentshort-term humanlong-term canineHuman trialseffectiveuntestedClosing thoughtsCaveatsSome of predictive performance coming from postictal signatureNeed high sensitivity at lower total time in warning ( < 0.1 )Future workExplore other types of features from iEEGHigh-frequency oscillationsSpectral entropy???Vary preictal horizonTidRefundMarital

StatusTaxable

IncomeCheat

1YesSingle125KNo

2NoMarried100KNo

3NoSingle70KNo

4YesMarried120KNo

5NoDivorced95KYes

6NoMarried60KNo

7YesDivorced220KNo

8NoSingle85KYes

9NoMarried75KNo

10NoSingle90KYes

10

RefundMarital

StatusTaxable

IncomeCheat

NoSingle75K?

YesMarried50K?

NoMarried150K?

YesDivorced90K?

NoSingle40K?

NoMarried80K?

10