Figure 5

Detecting apnea with arousal on ECG. (A) ECG time series with unique events detected by TOF (orange dots, \(E=3, \tau =0.02 \,\mathrm{s}, k=11, M=5 \,\mathrm{s}\)), outliers detected by LOF (blue + signs, \(E=7,\tau =0.02 \,\mathrm{s}, k=100\), threshold \(=0.5 \%\)) and the top discord (red x signs, M=5 s). The inset shows the more detailed pattern of detections: unique behavior mainly appears on the T waves. (B–D) Breathing air-flow time series parallel to the above ECG recording, colored according to the scores of the three anomaly methods. The anomaly starts with a period of irregular breathing at 340 s, followed by the apnea when breathing almost stops (350–370 s). After this anomalous period, arousal restores the normal breathing. (B) Airflow is colored according to the TOF score at each sample. Low values (darker colors) mark the anomaly corresponding to the period of apnea. (C) Air-flow time series with coloring corresponds to the LOF score at each sample. Higher LOF values mark the outliers. LOF finds irregular breathing preceding the apnea. (D) Airflow time series colored according to the matrix profile values by the discord. Discord detection algorithm finds the point of transition from irregular breathing to the apnea.