processing of electrocardiographic signals analysis of uk …davidc/pubs/ht2015_jo.pdf ·...

36
Processing of Electrocardiographic Signals analysis of UK Biobank data and arrhythmia detection Julien Oster Institute of Biomedical Engineering Dept of Engineering University of Oxford January 19, 2015

Upload: others

Post on 30-Dec-2019

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Processing of Electrocardiographic Signalsanalysis of UK Biobank data and arrhythmia detection

Julien Oster

Institute of Biomedical EngineeringDept of EngineeringUniversity of Oxford

January 19, 2015

Page 2: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

1 Biobank ECG DatabaseGeneral PresentationHeart Rate AnalysisAF detection, analysis of RR interval time-series

2 ECG model-based Bayesian filtering, and its application to Ventricular Beat ClassificationBayesian filtering and ECG modelSwitching Kalman FilterMethodResultsDiscussion

Page 3: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database General Presentation

Biobank project

“Big Data”

95182 subjects in UK have undergone 97952 ECG examinations

7-minute exercise ECG (if contraindication → 2-minute resting ECG)

Information stored in an xml file

3 ECG channelsSampling Frequency of 500Hz

Problem with some xml files

No ECG signals were recorded in some of the files

77202 ECG signals could be extracted (78.8%)20750 files do not contain an ECG signal (21.2%)

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 3 / 28

Page 4: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database General Presentation

Biobank project

“Big Data”

95182 subjects in UK have undergone 97952 ECG examinations

7-minute exercise ECG (if contraindication → 2-minute resting ECG)

Information stored in an xml file

3 ECG channelsSampling Frequency of 500Hz

Problem with some xml files

No ECG signals were recorded in some of the files

77202 ECG signals could be extracted (78.8%)20750 files do not contain an ECG signal (21.2%)

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 3 / 28

Page 5: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database Heart Rate Analysis

First processing steps

Extraction of RR interval time-series

Based on the winning algorithm of the Physionet/Computing in Cardiology 2014

Two QRS detectors are run on each of the three available leads

A second-by-second Signal Quality Index (SQI) is derived

Peaks detected on best SQI lead for each one-second window are used

Checks made that no double detections are made at the edges of windows

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 4 / 28

Page 6: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database Heart Rate Analysis

Signal Quality Index

Statistics

Max SQI over three leads for each one-second window

Mean and minimum of these values over the whole recording

Classification

6.4% files with mean< 0.9

27.6% files with min< 0.9 and 14% files with min< 0.8

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 5 / 28

Page 7: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database Heart Rate Analysis

Pre-Processing

An example of bad quality recording

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 6 / 28

Page 8: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database Heart Rate Analysis

Estimation of Heart Rate

Filtering the RR interval time-series

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 7 / 28

Page 9: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database Heart Rate Analysis

Estimation of Heart Rate

Filtering the RR interval time-series

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 8 / 28

Page 10: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database Heart Rate Analysis

Estimation of Heart Rate

Filtering the RR interval time-series

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 8 / 28

Page 11: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

AF detection

Follow up of some MSc students’ work

Roberta

Implementation and testing of Atrial Fibrillation Detectors for Mobile phone

application, MSc thesis, Politecnico di Milano, 2012

A Support Vector Machine approach for reliable detection of atrial fibrillation

events, Colloca et al., Cinc, 2013

Marisol

An Atrial Fibrillation Screening Android App, MSc thesis, University of

Oxford, 2013

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 9 / 28

Page 12: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

Detection principles

Why using RR interval time-series

Chaotic firing of AV node ⇒ irregular (unpredictable?) RRtime-series.

Interesting model of this phenomen developed by V. Corino at al.

Holter or mHealth recordings are prone to noise, and thus f-wavesestimation not feasible.

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 10 / 28

Page 13: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

Methodolgy

Combining features form state-of-the-art techniques

Moorman et al.

modified SampleEntropy called CosEn

Sarkar et al.

Poincare plot of derivative of RR intervalUnion Jack like segmentation

SVM-based classfication

window is considered to be AF if at least minNbeat AF beats insidetrained on Atrial Fibrillation DBtested on normal rhyhtm sinus DB and arrhythmia DB

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 11 / 28

Page 14: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

Coefficient of Sample Entropy

Formula

COSEn = SampEn − ln(r)− ln(RR)

Strange rules for setting r, length of matched segment etc...

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 12 / 28

Page 15: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

Poincare plot-based technique

Methodology

Strange choices of features, by counting the population of differentbins (then adding and subtracting them)

Strange choice for the normalization of the graph

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 13 / 28

Page 16: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

AF Detection on the Biobank database

5352 files with AF detected on segment with SQI≥ 0.9

1642 files with a suspected AF episode

751 files with suspected ventricular arrhythmia (at least a few PVCs)

2959 false positive files

Problem with exercise recordings

Use of mean RR as input feature to classification algorithm

Trend in RR intervals impact the different features

Analysis of non-stationary segments

Segments overlapping between exercise and recovery

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 14 / 28

Page 17: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

Analysis of detrended RR time-series

Detrend RR intervalsUse of Heart Rate estimate

Detection of changepoints

Start of exerciseEnd of exercise

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 15 / 28

Page 18: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

New Analysis

Run of new AF Detection

Use only 4 features out of original 9

Suppression of mean, std and kurtosis...

Application on detrended RR interval time-series

Results

3729 Files with detected pathology

566 patients with annotated AF missed420 patients with annotated V missed277 patients without annotated arrhythmia still detected2047 new patients detected

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 16 / 28

Page 19: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Biobank ECG Database AF detection, analysis of RR interval time-series

Discussion

Works to be done

New detections to be analysed

Problem with detrended RR?AF detection algo improvement?

How to evaluate overall quality?

Manual annotations neededHow to select files to be annotated

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 17 / 28

Page 20: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

1 Biobank ECG DatabaseGeneral PresentationHeart Rate AnalysisAF detection, analysis of RR interval time-series

2 ECG model-based Bayesian filtering, and its application to Ventricular Beat ClassificationBayesian filtering and ECG modelSwitching Kalman FilterMethodResultsDiscussion

Page 21: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Bayesian filtering and ECG model

Bayesian filtering

Basic principle

Bayesian filtering is a general paradigm ⇔ recursively estimating the posterior distributionp(X |y

1:k) of hidden random variables X given a sequence of noisy observations

{y1:k} = {y

1, y

2, · · · , y

k} and some prior information provided by the state-space

formulation.

Bayesian filtering ⇒ state space formalism (1){xk = f

(xk−1,wk−1, k − 1

)(evolution equation)

yk

= g (xk , vk , k) (observation equation), (1)

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 19 / 28

Page 22: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Bayesian filtering and ECG model

Bayesian filtering approach

Use of ECG modelling

ECG ⇒ pseudo-periodical signal

Approximation by a sum of gaussians McSharry, IEEE TBME, 50, 289-294, 2003

Modelling: θk = (θk−1 + ωδ) mod 2π

zk = −∑i

δαiω

b2i

∆θi,k−1 exp

(−

∆θ2i,k−1

2b2i

)+ zk−1 + η

, (2)

Figure 1: ECG model

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 20 / 28

Page 23: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Bayesian filtering and ECG model

Bayesian filtering approach

Use of ECG modelling

ECG ⇒ pseudo-periodical signal

Approximation by a sum of gaussians McSharry, IEEE TBME, 50, 289-294, 2003

Modelling: θk = (θk−1 + ωδ) mod 2π

zk = −∑i

δαiω

b2i

∆θi,k−1 exp

(−

∆θ2i,k−1

2b2i

)+ zk−1 + η

, (2)

Figure 1: ECG model

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 20 / 28

Page 24: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Bayesian filtering and ECG model

Bayesian filtering approach

Use of ECG modelling

ECG ⇒ pseudo-periodical signal

Approximation by a sum of gaussians McSharry, IEEE TBME, 50, 289-294, 2003

Modelling: θk = (θk−1 + ωδ) mod 2π

zk = −∑i

δαiω

b2i

∆θi,k−1 exp

(−

∆θ2i,k−1

2b2i

)+ zk−1 + η

, (2)

Figure 1: ECG modelJulien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 20 / 28

Page 25: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Bayesian filtering and ECG model

Bayesian filtering approach

Use of ECG modelling

ECG ⇒ pseudo-periodical signal

Approximation by a sum of gaussians McSharry, IEEE TBME, 50, 289-294, 2003

Modelling: θk = (θk−1 + ωδ) mod 2π

zk = −∑i

δαiω

b2i

∆θi,k−1 exp

(−

∆θ2i,k−1

2b2i

)+ zk−1 + η

, (2)

Figure 1: ECG modelJulien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 20 / 28

Page 26: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Bayesian filtering and ECG model

Bayesian filtering approach

Use of ECG modelling

ECG ⇒ pseudo-periodical signal

Approximation by a sum of gaussians McSharry, IEEE TBME, 50, 289-294, 2003

Modelling: θk = (θk−1 + ωδ) mod 2π

zk = −∑i

δαiω

b2i

∆θi,k−1 exp

(−

∆θ2i,k−1

2b2i

)+ zk−1 + η

, (2)

Figure 1: ECG model

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 20 / 28

Page 27: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Bayesian filtering and ECG model

Bayesian filtering approach

Use of ECG modelling

ECG ⇒ pseudo-periodical signal

Approximation by a sum of gaussians McSharry, IEEE TBME, 50, 289-294, 2003

Modelling: θk = (θk−1 + ωδ) mod 2π

zk = −∑i

δαiω

b2i

∆θi,k−1 exp

(−

∆θ2i,k−1

2b2i

)+ zk−1 + η

, (2)

Figure 1: ECG model

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 20 / 28

Page 28: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Switching Kalman Filter

Switching Kalman Filter

How to track non-stationarities ?

Model based filtering for normal rhythms, but what if new rhythm ? (PVC)

PVC beats could also be modeled with Gaussian waves but how choose which model isthe more likely ?

Swicthing Kalman Filter

Consider linear Kalman filter, with observation is y = H(i) × x(i) + v(i),

let denote R(i) = cov(v(i)), the covariance of the observation noise.

Innovation is defined as y(i)k = y

(i)k − H(i) × x

(i)k ,

which covariance is then: R(i)ε = R(i) + H(i)P

(i)(k−1,k)

H(i)T .

The residual likelihood for this mode, L(i):

L(i) =1

α

1√2π det(R

(i)ε )

exp(−1

2y

(i)T

k R(i)−1

ε y(i)k ), (3)

with α being a normalization factor, so that∑

i L(i) = 1.

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 21 / 28

Page 29: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Switching Kalman Filter

Switching Kalman Filter

How to track non-stationarities ?

Model based filtering for normal rhythms, but what if new rhythm ? (PVC)

PVC beats could also be modeled with Gaussian waves but how choose which model isthe more likely ?

Swicthing Kalman Filter

Consider linear Kalman filter, with observation is y = H(i) × x(i) + v(i),

let denote R(i) = cov(v(i)), the covariance of the observation noise.

Innovation is defined as y(i)k = y

(i)k − H(i) × x

(i)k ,

which covariance is then: R(i)ε = R(i) + H(i)P

(i)(k−1,k)

H(i)T .

The residual likelihood for this mode, L(i):

L(i) =1

α

1√2π det(R

(i)ε )

exp(−1

2y

(i)T

k R(i)−1

ε y(i)k ), (3)

with α being a normalization factor, so that∑

i L(i) = 1.

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 21 / 28

Page 30: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Switching Kalman Filter

X-Factor

What if no prior knowledge on pathological rhythms

when high level of noise or new rhythm appears: model cannot be iniatialized.

Consider a X-Factor with the following state-space formalism:(i) evolution equations xk = xk−1 +

dxk−1

fs+ ν1,k

dxk = dxk−1 + ν2,k

, (4)

fs being the sampling frequency, xk , dxk being the position and speed of the target and νkbeing the state noise.(ii) observation equations {

sk = xk + v1,k , (5)

sk being the observed signal (ECG) and v1,k the observation noise.

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 22 / 28

Page 31: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Method

Flowchart of the Method

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 23 / 28

Page 32: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Results

Results

Table 1: Scores obtained on the DS2 (MIT-BIH arrhythmia database)

V’ Classification V ClassificationTechnique Se +P F1 Se +P F1

de Chazal ∗ 86.5 42.7 57.1 85.1 81.9 83.5Llamedo et al. ∗ 95.3 28.6 44.0 94.6 88.1 91.2automatic Llamedo et al.a,∗ 82.1 77.9 79.9 90.1 86.0 88.0assisted Llamedo et al. ‡ 91.4 96.9 94.1 93.8 96.7 95.2SKF with no X-factor† 87.6 96.4 91.8 92.7 96.2 94.5SKF with X-factorb,† 90.5 99.96 95.2 97.3 99.96 98.6

a 0.12% of the heartbeats were not classified.b 3.2% of the heartbeats were classified as X-factor, and therefore discarded for the computationof these statistics.∗ These techniques are completely automatic.‡ 12 cluster centroids were annotated by an expert.† An average of 3 cluster centroids were annotated by an expert, with a 5th percentile of 1 beatand a 95th of 6 beats.

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 24 / 28

Page 33: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Results

Some examples

Behaviour of class likelihood in different situations

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 25 / 28

Page 34: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Results

How to analyse X-Factor Beats

Analysis of beats with an automatic SVM-based SQI

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 26 / 28

Page 35: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Switching Kalman Filter Discussion

Discussion

How to improve

Better “clustering”

Automatic classification of the clusters

Detection of Supraventricular Beats

Julien Oster (IBME, University of Oxford) Analysis of ECG signals January 19, 2015 27 / 28

Page 36: Processing of Electrocardiographic Signals analysis of UK …davidc/pubs/HT2015_jo.pdf · 2015-02-05 · Processing of Electrocardiographic Signals analysis of UK Biobank data and

Thanks for your attention