In this section, we present a description of the automatic arrhythmia detection algorithm (Section 5.3.1), followed by results for a range of detection response times (Section 5.3.2).

#### 5.

3.1 Arrhythmia detection algorithm

The arrhythmia detection algorithm uses thresholds in the level and variance of spectral entropy values observed in the cardiac disorder map to automatically detect and label rhythms in patient event series data. The afdb contains significantly fewer periods of atrial flutter compared to atrial fibrillation and normal sinus rhythm (periods of flutter total 1.

27 h, whereas periods of fibrillation total 91.59 h), the typical length of periods of flutter is of the order tens of seconds. Of the eight patients annotated as having flutter, only patients 04936 and 08378 have periods of flutter long enough (i.e., > ?) for analysis by the algorithm.For this reason we do not include here the flutter prediction method of the algorithm, although extensions including flutter follow a similar principle and are simple in practice to implement.

Other studies using the afdb (e.g., Tateno & Glass 2000, 2001) restrict themselves to methods differentiating only between fibrillation and normal sinus rhythm. Additional comments on the practicality of detecting atrial flutter and selected results for flutter will be given in the Discussion section (Section 5.4.1).

The five stages of the algorithm are shown in Figure 5.1. The first three 130 stages have been covered in depth as part of the Data Analysis section, but we include a brief summary here for completeness. We first obtain a binary string representing the dynamics of the heart for a given patient by discretizing the physionet data every ? = 30 ms (stage 1 to stage 2).

In stage 3, the spectral entropy measure is applied for windows of duration ? = L? , with L chosen for each patient such that there are on average ten beats within the spectral entropy window, giving ? as 6 s for a typical patient. Using an overlap parameter a (typically 1.5 s), leads to a series of spectral entropy values separated in time by this amount.Given no prior knowledge of the provided rhythm assessments, we calculate the standard deviation and average magnitude of M spectral entropy values in variance windows of length ? = Ma preceding a given time point. We use the example case of M equal to 20 (giving ? as 30 s for a typical patient). The level and standard deviation thresholds for atrial fibrillation are set consistent with values obtained from the cardiac disorder map, for this case we determine ?f ib = 0.84 and ?f ib = 0.018.

Stage 4 generates preliminary predictions for the rhythm state of the heart: we denote as fibrillating (AF) instances where the spectral entropy level is greater than ?f ib and the standard deviation is less than ?f ib, with all other combinations considered to be normal sinus rhythm (N)1 . Setting the overlap of variance windows such that b = a, we obtain a string of rhythm predictions drawn from the set {AF, N} and separated in time by b.Finally, in stage 5 we apply a rudimentary smoothing procedure to the initial string of rhythm predictions. For a particular prediction, we consider a preceding period ? = 2? + b = (2M + 1)L?/4, leading in this example to a typical length for ? of 61.5 s. We find the modal prediction: the prediction {AF, N} occurring most frequently in ?, labeling the modal prediction {AF? , N?}.

We call ? the modal smoothing window. In this form, we understand the windows ? and ? as setting the response time of the algorithm: ? is defined in terms of the number of preceding spectral entropy values required for a given prediction; for ? to register a change in rhythm, over half of the predictions must suggest the new rhythm. The response time is then ? 2 , which is approximately equal to ?. We have the modal smoothing windows overlapping with parameter c = b = a. This results in a final time series of predictions and constitutes the output of the arrhythmia detection algorithm for a given patient.

An example of the algorithm output for patient 08378 (including a threshold for atrial flutter) is shown in Figure 5.2.We apply the above steps, comprising the three data windows (?, ?, ?), to each patient in the afdb. Specifying ? , L and M fixes the remaining parameters, their exact magnitude determined by L. A summary of windowing symbols can be found in Table 5.1.

Values for the atrial fibrillation threshold parameters (?f ib and ?f ib) are kept the same for each patient for a given response time. The results obtained from the algorithm are described in the following section.

#### 5.

3.2 Algorithm results

We now present the results of the cardiac arrhythmia detection algorithm for atrial fibrillation. The following window parameters were used: ? is set to 30 ms, L is chosen such that ? is expected to contain 10 beats, and M 132 is set to 20, windows have overlap parameters c = b = a = ? 4 (for typical patients in the afdb, ? ? 6s, ? ? 30s, ? ? 61.5s, and a ? 1.5s). Threshold values for fibrillation are set at ?f ib = 0.

84 for the spectral entropy level and ?f ib = 0.018 for the standard deviation. Each prediction produced by the algorithm (denoted by a primed symbol) is compared with the rhythm assessment documented in the database and can be classified into one of four categories (Hulley & Cumming 1988): true positive (TP), AF is classified as AF? ; true negative (TN), non-AF is classified as non-AF? ; false negative (FN), AF is classified as non-AF? ; false positive (FP), non-AF is classified as AF? .Percentages of these quantities for each patient and for the entire afdb are given in Table 5.2. Overall, we obtain a predictive capability (assessed using the percentage of predictions agreeing with the provided annotations) of 89.5%. The sensitivity and specificity metrics are defined by TP/(TP+FN) and TN/(TN+FP), respectively.

The predictive value of a positive test (PV+) and the predictive value of a negative test (PV?) are de- fined by TP/(TP+FP) and TN/(TN+FN), respectively. These, and results for other values of ? are given in Table 5.3.In repeating the algorithm with different values for the variance window, shorter ? represents a quicker response time.

We obtain for each ? a new disorder map to determine the relevant threshold values. For the rapid response case, ? typically 6 s, we alter the fibrillating thresholds in the arrhythmia detection algorithm to be ?f ib = 0.855 and ?f ib = 0.016; we find a predictive capability of 85.7%. With ? typically 60 s, the fibrillating thresholds become ?f ib = 0.

84 and ?f ib = 0.019; the predictive capability is 90.3%.Further Work and Conclusion**Previous Page – Rapidly Detecting Disorder in Rhythmic Biological Signals**