Last updated: 2022-03-15

Checks: 7 0

Knit directory: false.alarm/docs/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20201020) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version a0d56a1. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Renviron
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    .devcontainer/exts/
    Ignored:    .devcontainer/git-hours.tgz
    Ignored:    .devcontainer/mathjax.tgz
    Ignored:    .github/ISSUE_TEMPLATE/
    Ignored:    .httr-oauth
    Ignored:    R/RcppExports.R
    Ignored:    _classifier/.gittargets
    Ignored:    _classifier/meta/process
    Ignored:    _classifier/meta/progress
    Ignored:    _classifier/objects/
    Ignored:    _classifier/scratch/
    Ignored:    _classifier/user/
    Ignored:    _regime_change/meta/process
    Ignored:    _regime_change/meta/progress
    Ignored:    _regime_change/objects/
    Ignored:    _regime_change/scratch/
    Ignored:    _regime_change/user/
    Ignored:    _targets/meta/process
    Ignored:    _targets/meta/progress
    Ignored:    _targets/objects/
    Ignored:    _targets/scratch/
    Ignored:    _targets/user/
    Ignored:    dev/
    Ignored:    inst/extdata/
    Ignored:    output/images/
    Ignored:    papers/aime2021/aime2021.md
    Ignored:    presentations/MEDCIDS21/MEDCIDS21-10min_files/
    Ignored:    presentations/MEDCIDS21/MEDCIDS21_files/
    Ignored:    presentations/Report/Midterm-Report.md
    Ignored:    presentations/Report/Midterm-Report_cache/
    Ignored:    presentations/Report/Midterm-Report_files/
    Ignored:    protocol/FirstReport.tex
    Ignored:    protocol/Protocol.tex
    Ignored:    protocol/SecondReport.tex
    Ignored:    protocol/SecondReport_cache/
    Ignored:    protocol/SecondReport_files/
    Ignored:    protocol/_files/
    Ignored:    renv/library/
    Ignored:    renv/python/
    Ignored:    renv/staging/
    Ignored:    src/RcppExports.cpp
    Ignored:    src/RcppExports.o
    Ignored:    src/contrast.o
    Ignored:    src/false.alarm.so
    Ignored:    src/fft.o
    Ignored:    src/mass.o
    Ignored:    src/math.o
    Ignored:    src/mpx.o
    Ignored:    src/scrimp.o
    Ignored:    src/stamp.o
    Ignored:    src/stomp.o
    Ignored:    src/windowfunc.o
    Ignored:    thesis/Rplots.pdf
    Ignored:    thesis/_bookdown_files/
    Ignored:    tmp/

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/blog.Rmd) and HTML (docs/blog.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd a0d56a1 Francisco Bischoff 2022-03-15 wflow_publish("analysis/*.Rmd", all = TRUE, republish = TRUE,
Rmd c155156 Francisco Bischoff 2022-03-14 workflowr asd
Rmd d661e13 Francisco Bischoff 2022-03-14 workflowr 3
Rmd 0aefdd1 Francisco Bischoff 2022-03-14 workflowr 2
Rmd 5f35362 Francisco Bischoff 2022-03-14 rekniting
html 0aefdd1 Francisco Bischoff 2022-03-14 workflowr 2
html 5f35362 Francisco Bischoff 2022-03-14 rekniting
html 863566a GitHub Actions 2022-03-11 Build site.
Rmd 4e9c8a6 Francisco Bischoff 2022-03-11 workflowr
html 8ea33a2 GitHub Actions 2022-03-11 Build site.
Rmd 6004462 Francisco Bischoff 2022-03-11 workflowr
html 6004462 Francisco Bischoff 2022-03-11 workflowr
Rmd d9dc8ec Francisco Bischoff 2022-03-08 stuffs
Rmd 0f2f487 Francisco Bischoff 2022-03-03 spellchecking
html 4884ec1 Francisco Bischoff 2022-02-02 work
html 867bcf2 Francisco Bischoff 2022-01-16 workflowr
Rmd 0c43c48 Francisco Bischoff 2022-01-12 wsl
Rmd 95ae431 Francisco Bischoff 2022-01-05 blogdog
Rmd 4fbd6a6 Francisco Bischoff 2022-01-04 bloggin
Rmd 1ef8e75 Francisco Bischoff 2021-10-14 freeze for presentation
html ca1941e GitHub Actions 2021-10-12 Build site.
Rmd 6b03f43 Francisco Bischoff 2021-10-11 Squashed commit of the following:
html 6b03f43 Francisco Bischoff 2021-10-11 Squashed commit of the following:
html 1bcac45 Francisco Bischoff 2021-08-17 site
Rmd c88cbd5 Francisco Bischoff 2021-08-17 targets workflowr

Purpose

This blog is a continuation of the thesis Report link. The reader must follow this page from top to bottom.

2021, August Update #1

The first workflow presented in July has changed. Its purpose was to define a “big picture” of the process.

The main changes introduced were:

The Data

Initially, the data had been carried along the workflow, being copied at each new step. That obviously is not the way to handle it. Thus, the raw data is stored only on the “dataset” object and reused where needed.

Now, any modification to the raw data will create a new object, for example, “ds_filtered,” where the SQI filter is applied to the data.

Streaming paradigm

The goal of this work is to operate with streaming data. Thus, the Matrix Profile computation algorithm has been rewritten to handle receiving data in chunks. The algorithm can simulate one observation at a time or a batch of observations (for efficiency). The result will always be as if one observation had been received individually by the model.

To avoid unnecessary recomputations for this analysis phase, the companion statistics needed by the model are pre-computed and fed alongside the data the algorithm needs to process. The pre-computation also allows experimenting with parameters during this process.

2021, October Update #1

Regime Change Detection

While implementing the streaming-like pipeline, some declarations must be made. In 2017, the FLUSS (Fast Low-cost Unipotent Semantic Segmentation) and the FLOSS (Fast Low-cost Online Semantic Segmentation) algorithms were introduced by Gharghabi et al.1. In 2018, the same group published their findings using multi-dimensional time series2 using the same algorithms.

Claims about the algorithm:

  • Domain Agnosticism: the algorithm makes no assumptions about the data as opposed to most available algorithms to date.
  • Streaming: the algorithm can provide real-time information.
  • Real-World Data Suitability: the objective is not to explain all the data. Therefore, areas marked as “don’t know” areas are acceptable.
  • FLOSS is not: a change point detection algorithm3. The interest here is changes in the shapes of a sequence of measurements.

Briefly describing the regime detection algorithm, which can be explored in the original paper2, it is based on the assumption that between two regimes, the most similar shape (its nearest neighbor) is located on “the same side”. This information is obtained from the Matrix Profile computation. More precisely, using only the Profile Index.

Before talking about the Matrix Profile computation, some findings deserve to be mentioned:

In chapter 3.5 in the original paper, the authors of FLOSS wisely introduce the temporal constraint. Nevertheless, some details are not mentioned. 1) As this algorithm only needs the Profile Index, should we use the already computed Indexes or recompute the Matrix Profile using this constraint (i.e., the constraint is on the Profile Index or the FLOSS algorithm?). That is not an issue about the algorithm but a choice we need to make beforehand. One option is to apply the constraint on the Profile Index, and we need to have this parameter set from the start. The second option is to have the FLOSS algorithm not account for the indexes beyond the constraint, keeping the original Profile Index. 2) The authors declare the correction curve typically used on FLUSS and FLOSS as “simply a uniform distribution”, but this is not an accurate statement. Empirically, there is a helpful pattern to know about the distribution when using temporal constraints (at least from the start, in the Matrix Profile stage). At first glance, we see that the distribution resembles the skewed distribution used in FLOSS but is shorter, while the \(constraint \ge MatrixProfileSize/2\). For lower constraints, the maximum value of this distribution is equal to \(MatrixProfileSize/2\) between the indexes \(constraint\) to the index \(MatrixProfileSize - (constraint \times 0.9)\). This is shown in Fig. 1. That is important because the output of the FLOSS algorithm should be normalized and constrained between 0 and 1, which allows us to compare different trials using different parameters in the process. Finally, the last datapoints are not irrelevant, opposed to what was stated by the authors, since an Online algorithm needs to return an answer as soon as the application domain requires. That is very much relevant to this work’s field, as, for example, for asystole detection, we have a window of 4 seconds to fire the alarm. If the time constraint is 10 seconds, this would mean (by the original article) that the last 10 seconds of the incoming data would not be sufficient to detect the regime change.

As for the first point mentioned above, it seems more appropriate to set the temporal constraint in the Matrix Profile algorithm, and indeed this is what the original paper did. That reduces the computation time of the online Matrix Profile, and any post-processing done afterward will inherit this constraint. The distribution for correcting the FLOSS algorithm is also simpler. On the other hand, it is possible to apply the time constraint in the FLOSS algorithm, leaving the online Matrix Profile in its original form. See Fig. 2. The theoretical distribution changes significantly according to the constraint value. The upside of this approach, at least during the prospective phase, is to allow us to decide the time constraint value later in the pipeline, avoiding the recomputation of the Matrix Profile. The results on detecting regime changes are very similar to the first approach. See Fig. 3.

Concerning the second point mentioned above, the solution for evaluating the effect of using time constraints in this work’s setting was to generate the ideal distribution using the constrained parameters beforehand. That gives us enough data to evaluate a regime change accurately utilizing a minimum of \(2 \times WindowSize\) datapoints. The best index is still to be determined, and current tests are using 3 seconds limit.

1D-IAC distributions for earlier temporal constraint (on Matrix Profile)

Figure 1: 1D-IAC distributions for earlier temporal constraint (on Matrix Profile)

Version Author Date
5f35362 Francisco Bischoff 2022-03-14
863566a GitHub Actions 2022-03-11
8ea33a2 GitHub Actions 2022-03-11
d9dc8ec Francisco Bischoff 2022-03-08
867bcf2 Francisco Bischoff 2022-01-16
ca1941e GitHub Actions 2021-10-12
1D-IAC distributions for later temporal constraint (on FLOSS)

Figure 2: 1D-IAC distributions for later temporal constraint (on FLOSS)

Version Author Date
5f35362 Francisco Bischoff 2022-03-14
CAC and Regime detection using early and later IAC

Figure 3: CAC and Regime detection using early and later IAC

Version Author Date
5f35362 Francisco Bischoff 2022-03-14

The Matrix Profile Algorithm

Since the first Matrix Profile computation algorithm, the STAMP4, several improvements on the algorithm were made5,6. Still, the ability to keep a growing Matrix Profile (i.e., Online) relies on the STAMP algorithm. If the problem allows collecting several data points (chunks), STOMP5 can speed up the computation. Curiously, the main bottleneck of all these algorithms is the FFT (Fast Fourier Transform) algorithm that is the core of the MASS algorithm published by Mueen et al.7 in 2010 and later in 2015, having its code released on Professor Mueen’s webpage8. The FFT libraries available are highly optimized and CPU (or GPU) dependent what makes it at the same time fast but brittle and not suitable for MCU’s (Microcontroller Unit), for example. More interestingly yet, is the fact that several published works using Matrix Profile, MPdist9, for instance, uses an unpublished algorithm called ‘MPX’ that computes the Matrix Profile using cross-correlation methods ending up faster and is easily portable.

This work contributes to extending the MPX algorithm to allow the Online computation of the Matrix Profile. More precisely, we are interested in the Right Matrix Profile, whose updated indexes refer only to the last incoming datapoint since we are looking for future regime changes, not backward. This one-directional algorithm is already described in the FLOSS paper2.

Another contribution of this work is an unexplored constraint that we could apply on building the Matrix Profile that we will call Similarity Threshold (ST). The original work outputs the similarity values in Euclidean Distance (ED) values, while MPX naturally outputs the values in Pearson’s correlation (CC) coefficients. Both ED and CC are interchangeable using the equation \(\eqref{edcc}\). However, we may argue that it is easier to compare values that do not depend on the \(WindowSize\) during an exploratory phase. MPX happens to naturally return values in CC, saving a few more computation time.

\[ CC = 1 - \frac{ED}{(2 \times WindowSize)} \tag{1} \label{edcc} \]

The ST is an interesting factor that we can use, especially when detecting pattern changes during time. The FLUSS/FLOSS algorithms rely on counting references between indexes in the time series. ST can help remove “noise” from these references since only similar patterns above a certain threshold are referenced, and changes have more impact on these counts. More information and visual content on ST will be provided later. The best ST threshold is still to be determined.

2022, January Update #1

These last months were dedicated to several important things:

  1. Restructuring the roadmap
  2. Refining the main pipeline
  3. Preparing for modeling and parameter tuning
  4. Feasibility trial
  5. And others

Refining the main pipeline

That can also be thought of as “rethinking” the pipeline. What also leads to the roadmap restructuration.

It is essential not only to write a pipeline that can “autoplot” itself for fine-grain inspection but also to design a high-level graph that can explain it “in a glance”. This exercise was helpful both ways: telling the story in a short version also reveals missing things and misleading paths that are not so obvious when thinking “low-level”.

Preparing for modeling and parameter tuning

Although this work has its purpose of being finally deployed on small hardware, this prospective phase will need several hours of computing, tuning, evaluation, and validation of all findings.

Thus it was necessary to revisit the frameworks we are used to working on R: caret and the newest tidymodels collection. For sure, there are other frameworks and opinions10. Notwithstanding, this project will follow the tidymodels road. Two significant arguments 1) constantly improving and constantly being re-checked for bugs; 2) allows to plug in a custom modeling algorithm that, in this case, will be the one needed for developing this work.

Feasibility trial

A side-project called “false.alarm.io” has been derived from this work (an unfortunate mix of “false.alarm” and “PlatformIO”11, the IDE chosen to interface the panoply of embedded systems we can experiment). The current results of this side-project are very enlightening and show that the final algorithm can indeed be used in small hardware. Further data will be available in the future.

And others

After this “step back” to look forward, it was time to define how the regime change algorithm would integrate with the actual decision of triggering or not the alarm. Some hypotheses were thought out: (1) clustering similar patterns, (2) anomaly detection, (3) classification, and (4) forecasting. Among these methods, it was thought to avoid exceeding processor capacity, an initial set of shapelets12 can be sufficient to rule in or out the TRUE/FALSE challenge. Depending on the accuracy of this approach and the resources available, another method can be introduced for both (1) improving the “negative”1 samples and (2) learning more shapelets to improve the TRUE/FALSE alarm discrimination.

Minor update, but also important concerning the FAIR principle “Interoperability”: the dataset stored publicly on Zenodo13 was converted from .mat to .csv.

2022, March Update #1 (work in progress)

These last couple of months were dedicated to:

  1. Writing the new report
  2. Presenting the report to the jury
  3. Getting back to the filters

Back to the filters

Version Author Date
0f2f487 Francisco Bischoff 2022-03-03

Back at the beginning of this thesis, we have talked about using some kind of filtering to be used during the signal acquisition in order to not process artifacts and disconnected cables, for example. This was described in the section “Preparing the data” on the report.

The initial approach to select the “complexity” formula14 was based on a few experiments that I felt deserved a more scientific approach.

TLDR; “complexity” is still the best choice, but here are the steps for choosing it.

Several signal quality indexes (SQI) were used to assess the ECG signal’s noise in literature. A brief list of them:

  1. Activity: is just the variance of the signal \[ Activity = Var(data) \]
  2. Mobility: derives from the Activity. The squared root of the ratio of the variance of the first derivative of the signal to the variance of the original signal \[ Mobility = \sqrt{\frac{Var(\nabla{data})}{Var(data)}} \]
  3. Complexity2: Ratio of the Mobility of the first derivative of the signal to the Mobility of the original signal \[ Complexity = \frac{\sqrt{\frac{Var(\nabla^2{data})}{Var(\nabla{data})}}}{\sqrt{\frac{Var(\nabla{data})}{Var(data)}}} \rightarrow \frac{\sqrt{Var(\nabla^2{data}) \cdot Var(data)}}{Var(\nabla{data})} \]
  4. complexity: This is the SQI defined by Batista, et al.14, and we will write it as complexity (lower case) to not confuse with the Complexity from point 3. This was built by the author around a simple intuition: more complex signals, when “stretched”, are longer than simple signals. Fig. 4 shows this intuition. The formula is just the “sum of squares of the differences”.
From Batista _et al._ shows on the left side, the signal, and on the right side, the signal "stretched".

Figure 4: From Batista et al. shows on the left side, the signal, and on the right side, the signal “stretched”.

Version Author Date
d9dc8ec Francisco Bischoff 2022-03-08

\[ complexity = \sqrt{\sum{(\nabla data)^2}} \]

  1. Kurtosis: Measure of the Gaussianity of a distribution. As ECG signals are hyper-Gaussian, higher kurtosis values are associated with lower quality in the ECG. One of its simples formula (which is quite complicated) is:

\[ Kurtosis = \frac{1}{n}\sum_{i=1}^{n}{\left(\frac{x_i - \bar x}{\sigma}\right)^4} - 3 \]

  1. Karhunen-Loeve transform (KLT): KLT is a transformation that reduces a large set of variables down to a smaller set. The smaller set of variables separates the information of the different sources (ECG and Noise). In this way, noise can be estimated, and the SNR calculated.
  2. First-Difference histogram: The baseline is defined as the most common sample value during R-R periods. The sample value corresponding to the histogram peak (mode) was declared the baseline, and the difference between consecutive baselines gives the baseline shift from beat to beat. Noise is estimated from the first-difference histogram of R-R intervals. Noise contribution is one minus the frequency of occurrence of first differences with values around zero divided by the number of samples in the R-R interval.
  3. Turns counts: Counting of the number of local minimums with amplitude higher than a threshold (e.g. 0.1mV). This SQI is actually robust to noise, so it is not suitable for evaluating noise.

This is not an exhaustive list. Also, we want a simple SQI as we must use the smallest processor and memory possible. For this reason, we will do the experiments with the following SQI on that list: Activity, Mobility, Complexity, and complexity. In addition, we will experiment with another simple index, the signal’s amplitude.

Let’s take the first 12 files from Physionet’s Challenge dataset, in alphabetic order, from a103l to a165l. By manual inspection, we have the following files as negative for noise #4, #7, #8, #10, #11, #12. And for positive for noise the following #1, #2, #3, #5, #6, #9.

           used  (Mb) gc trigger  (Mb) max used  (Mb)
Ncells  1307490  69.9    2490630 133.1  2490630 133.1
Vcells 17615382 134.4   24512918 187.1 17625785 134.5

Fig. 5 shows a sample of a positive and a negative signal (for noise) and a sample of some SQI. We need an index with a low value when the signal has low noise and a high value when there is a noisy signal (that we will not process).

ECG samples of the positive (for noise) and negative

Figure 5: ECG samples of the positive (for noise) and negative

Version Author Date
5f35362 Francisco Bischoff 2022-03-14

First, we need to specify how to evaluate the performance of the SQIs, without a hard labeled annotation, i.e., only knowing that one series has noise (but we don’t know where) and other series doesn’t have noise. Another information by quick inspection is that all 12 time series are “clean” from data points 30500 to 32500. This gives us a hint of the starting threshold for what is “negative”.

As we can see in Fig. 5, the SQI fluctuates where there is a clean QRS complex. The threshold must be above this fluctuation.

To be more robust in defining such threshold \(\theta\), instead of finding the maximum value, we will take the quantile 0.9 of those values and then multiply this value by some constant:

\[ \theta = Q_{SQI}(0.9) \cdot \epsilon, \quad \{\epsilon \in \mathbb{R}^+_*\} \]

What is expected is that we will have no values above the threshold on the negative set. And on the positive set, we will have values above, where there is noise.

Another aspect we must consider is the normalization of the time series and the gain value. The Physionet’s data, in general, has the information about the gain used to convert the signal from mV to the digital format. Afterward, when importing the dataset, their tool divides the digital values by the gain, converting them back to mV. This should, in theory, give us signals on a similar scale, but in some recordings, the gain seems to introduce some differences (maybe the patient had a weak signal or the wrong gain was used?). This is only a problem if we do not normalize (mean zero and standard deviation one) the signal before computing the SQI. Thus the SQIs must be compared on four settings 1) with normalization, 2) without normalization without gain, and 2) without normalization with gain and, for completeness, let’s also apply the gain in the SQI only (data without normalization and without gain).

It is important to say that the normalization step is done when computing the Matrix Profile. Thus, we don’t want to compute yet another normalization. This means we must use the window size of the Matrix Profile, while the filter does not necessarily need to use that same window size. This has implications on comparing Mobility, Complexity15, and Kurtosis because they are invariant to applying or not the gain on the original data (since all have the data in numerator and denominator). They would be invariant to the normalization only if both the normalization and the SQI use the same window size.

Furthermore, as we can see below, we can anticipate that the remaining SQIs are invariant to the gain \(g\) applied directly on the data or on the SQI itself.

The Activity (variance):

\[ \begin{eqnarray} Activity(\vec{X}) &=& Var\left(\frac{(x_i, x_{i+1}, \ldots, x_n)}{g}\right) \\ &\equiv& \frac{Var(x_i, x_{i+1}, \ldots, x_n)}{g^2} \end{eqnarray} \quad, \{ \vec{X} \in \mathbb{R}, g \in \mathbb{R} \mid g \gt 0 \} \]

The complexity, from Batista, et al.14:

\[ \begin{eqnarray} complexity(\vec{X}) &=& \sqrt{\sum_{i=1}^n{\left[\nabla \frac{(x_i, x_{i+1}, \ldots, x_n)}{g}\right]^2}} \\ &\equiv& \frac{\sqrt{\sum_{i=1}^n{\left[\nabla (x_i, x_{i+1}, \ldots, x_n)\right]^2}}}{g} \end{eqnarray} \quad, \{ \vec{X} \in \mathbb{R}, g \in \mathbb{R} \mid g \gt 0 \} \]

The amplitude of the segments:

\[ \begin{eqnarray} A(\vec{X}) &=& \max{\left(\frac{(x_i, x_{i+1}, \ldots, x_n)}{g}\right)} - \min{\left(\frac{(x_i, x_{i+1}, \ldots, x_n)}{g}\right)} \\ &\equiv& \frac{\max{(x_i, x_{i+1}, \ldots, x_n)} - \min{(x_i, x_{i+1}, \ldots, x_n)}}{g} \end{eqnarray} \ , \{ \vec{X} \in \mathbb{R}, g \in \mathbb{R}\} \]

To be continued…s

Further Steps

  • Publish results

References

1.
Gharghabi S, Ding Y, Yeh C-CM, Kamgar K, Ulanova L, Keogh E. 2017 IEEE international conference on data mining (ICDM). In: IEEE; 2017. doi:10.1109/icdm.2017.21
2.
Gharghabi S, Yeh C-CM, Ding Y, et al. Domain agnostic online semantic segmentation for multi-dimensional time series. Data Mining and Knowledge Discovery. 2018;33(1):96-130. doi:10.1007/s10618-018-0589-3
3.
Aminikhanghahi S, Cook DJ. A survey of methods for time series change point detection. Knowledge and Information Systems. 2016;51(2):339-367. doi:10.1007/s10115-016-0987-z
4.
Yeh C-CM, Zhu Y, Ulanova L, et al. 2016 IEEE 16th international conference on data mining (ICDM). In: IEEE; 2016. doi:10.1109/icdm.2016.0179
5.
Zhu Y, Zimmerman Z, Senobari NS, et al. 2016 IEEE 16th international conference on data mining (ICDM). In: IEEE; 2016. doi:10.1109/icdm.2016.0085
6.
Zhu Y, Yeh C-CM, Zimmerman Z, Kamgar K, Keogh E. 2018 IEEE international conference on data mining (ICDM). In: IEEE; 2018. doi:10.1109/icdm.2018.00099
7.
Mueen A, Nath S, Liu J. SIGMOD/PODS ’10: International conference on management of data. In: ACM; 2010. doi:10.1145/1807167.1807188
8.
Mueen A, Zhu Y, Yeh M, et al. The fastest similarity search algorithm for time series subsequences under euclidean distance. Published 2017. Accessed October 2, 2021. https://www.cs.unm.edu/~mueen/FastestSimilaritySearch.html
9.
Gharghabi S, Imani S, Bagnall A, Darvishzadeh A, Keogh E. 2018 IEEE international conference on data mining (ICDM). In: IEEE; 2018. doi:10.1109/icdm.2018.00119
10.
Thompson J. On not using tidymodels. Published October 2020. Accessed January 5, 2022. https://staffblogs.le.ac.uk/teachingr/2020/10/05/on-not-using-tidymodels/
11.
PlatformIO, a professional collaborative platform for embedded development. Accessed January 5, 2022. https://platformio.org/
12.
Rakthanmanon T, Keogh E. Fast shapelets: A scalable algorithm for discovering time series shapelets. In: Proceedings of the 2013 SIAM International Conference on Data Mining. Society for Industrial; Applied Mathematics; 2013:668-676. doi:10.1137/1.9781611972832.74
13.
Reducing False Arrhythmia Alarms in the ICU - The PhysioNet Computing in Cardiology Challenge 2015. Published online March 24, 2021. doi:10.5281/zenodo.4634013
14.
Batista GEAPA, Keogh EJ, Tataw OM, Souza VMA de. CID: an efficient complexity-invariant distance for time series. Data Mining and Knowledge Discovery. 2014;28(3):634-669. doi:10.1007/s10618-013-0312-3
15.
Del Rio BAS, Lopetegi T, Romero I. Assessment of different methods to estimate electrocardiogram signal quality. Computing in Cardiology. 2011;38:609-612.

─ Session info ───────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.1.2 (2021-11-01)
 os       Ubuntu 20.04.3 LTS
 system   x86_64, linux-gnu
 ui       X11
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/Lisbon
 date     2022-03-15
 pandoc   2.17.0.1 @ /usr/bin/ (via rmarkdown)

─ Packages ───────────────────────────────────────────────────────────────────
 package        * version    date (UTC) lib source
 askpass          1.1        2019-01-13 [1] CRAN (R 4.1.2)
 backports        1.4.1      2021-12-13 [1] CRAN (R 4.1.2)
 base64url        1.4        2018-05-14 [1] CRAN (R 4.1.2)
 bookdown         0.24.11    2022-03-10 [1] Github (rstudio/bookdown@7fd6224)
 brio             1.1.3      2021-11-30 [1] CRAN (R 4.1.2)
 bslib            0.3.1      2021-10-06 [1] CRAN (R 4.1.2)
 cachem           1.0.6      2021-08-19 [1] CRAN (R 4.1.2)
 callr            3.7.0      2021-04-20 [1] CRAN (R 4.1.2)
 cli              3.2.0      2022-02-14 [1] CRAN (R 4.1.2)
 codetools        0.2-18     2020-11-04 [1] CRAN (R 4.1.2)
 colorspace       2.0-3      2022-02-21 [1] CRAN (R 4.1.2)
 crayon           1.5.0      2022-02-14 [1] CRAN (R 4.1.2)
 credentials      1.3.2      2021-11-29 [1] CRAN (R 4.1.2)
 data.table       1.14.2     2021-09-27 [1] CRAN (R 4.1.2)
 debugme          1.1.0      2017-10-22 [1] CRAN (R 4.1.2)
 desc             1.4.1      2022-03-06 [1] CRAN (R 4.1.2)
 devtools         2.4.3      2021-11-30 [1] CRAN (R 4.1.2)
 digest           0.6.29     2021-12-01 [1] CRAN (R 4.1.2)
 dplyr            1.0.8      2022-02-08 [1] CRAN (R 4.1.2)
 ellipsis         0.3.2      2021-04-29 [1] CRAN (R 4.1.2)
 evaluate         0.15       2022-02-18 [1] CRAN (R 4.1.2)
 fansi            1.0.2      2022-01-14 [1] CRAN (R 4.1.2)
 farver           2.1.0      2021-02-28 [1] CRAN (R 4.1.2)
 fastmap          1.1.0      2021-01-25 [1] CRAN (R 4.1.2)
 fs               1.5.2      2021-12-08 [1] CRAN (R 4.1.2)
 generics         0.1.2      2022-01-31 [1] CRAN (R 4.1.2)
 gert             1.5.0      2022-01-03 [1] CRAN (R 4.1.2)
 getPass          0.2-2      2017-07-21 [1] CRAN (R 4.1.2)
 ggplot2        * 3.3.5      2021-06-25 [1] CRAN (R 4.1.2)
 git2r            0.29.0     2022-03-10 [1] Github (ropensci/git2r@d128a42)
 gittargets     * 0.0.3.9000 2022-02-27 [1] Github (wlandau/gittargets@13a9cd8)
 glue           * 1.6.2      2022-02-24 [1] CRAN (R 4.1.2)
 gridExtra        2.3        2017-09-09 [1] CRAN (R 4.1.2)
 gtable           0.3.0      2019-03-25 [1] CRAN (R 4.1.2)
 here           * 1.0.1      2020-12-13 [1] CRAN (R 4.1.2)
 highr            0.9        2021-04-16 [1] CRAN (R 4.1.2)
 htmltools        0.5.2      2021-08-25 [1] CRAN (R 4.1.2)
 httpuv           1.6.5      2022-01-05 [1] CRAN (R 4.1.2)
 httr             1.4.2      2020-07-20 [1] CRAN (R 4.1.2)
 igraph           1.2.11     2022-01-04 [1] CRAN (R 4.1.2)
 jquerylib        0.1.4      2021-04-26 [1] CRAN (R 4.1.2)
 jsonlite         1.8.0      2022-02-22 [1] CRAN (R 4.1.2)
 knitr            1.37       2021-12-16 [1] CRAN (R 4.1.2)
 labeling         0.4.2      2020-10-20 [1] CRAN (R 4.1.2)
 languageserver   0.3.12     2021-10-19 [1] CRAN (R 4.1.2)
 later            1.3.0      2021-08-18 [1] CRAN (R 4.1.2)
 lifecycle        1.0.1      2021-09-24 [1] CRAN (R 4.1.2)
 magrittr         2.0.2      2022-01-26 [1] CRAN (R 4.1.2)
 memoise          2.0.1      2021-11-26 [1] CRAN (R 4.1.2)
 munsell          0.5.0      2018-06-12 [1] CRAN (R 4.1.2)
 openssl          2.0.0      2022-03-02 [1] CRAN (R 4.1.2)
 pillar           1.7.0      2022-02-01 [1] CRAN (R 4.1.2)
 pkgbuild         1.3.1      2021-12-20 [1] CRAN (R 4.1.2)
 pkgconfig        2.0.3      2019-09-22 [1] CRAN (R 4.1.2)
 pkgload          1.2.4      2021-11-30 [1] CRAN (R 4.1.2)
 prettyunits      1.1.1      2020-01-24 [1] CRAN (R 4.1.2)
 processx         3.5.2      2021-04-30 [1] CRAN (R 4.1.2)
 promises         1.2.0.1    2021-02-11 [1] CRAN (R 4.1.2)
 ps               1.6.0      2021-02-28 [1] CRAN (R 4.1.2)
 purrr            0.3.4      2020-04-17 [1] CRAN (R 4.1.2)
 R6               2.5.1      2021-08-19 [1] CRAN (R 4.1.2)
 Rcpp             1.0.8.2    2022-03-11 [1] CRAN (R 4.1.2)
 remotes          2.4.2      2021-11-30 [1] CRAN (R 4.1.2)
 renv             0.15.4     2022-03-03 [1] CRAN (R 4.1.2)
 rlang            1.0.2.9000 2022-03-14 [1] Github (r-lib/rlang@22fe9e9)
 rmarkdown        2.13.1     2022-03-10 [1] Github (rstudio/rmarkdown@1ef2cf3)
 rprojroot        2.0.2      2020-11-15 [1] CRAN (R 4.1.2)
 rstudioapi       0.13       2020-11-12 [1] CRAN (R 4.1.2)
 sass             0.4.0      2021-05-12 [1] CRAN (R 4.1.2)
 scales           1.1.1      2020-05-11 [1] CRAN (R 4.1.2)
 sessioninfo      1.2.2      2021-12-06 [1] CRAN (R 4.1.2)
 stringi          1.7.6      2021-11-29 [1] CRAN (R 4.1.2)
 stringr          1.4.0      2019-02-10 [1] CRAN (R 4.1.2)
 sys              3.4        2020-07-23 [1] CRAN (R 4.1.2)
 tarchetypes    * 0.4.1      2022-01-07 [1] CRAN (R 4.1.2)
 targets        * 0.10.0     2022-01-07 [1] CRAN (R 4.1.2)
 testthat         3.1.3      2022-02-27 [1] Github (r-lib/testthat@22a68dd)
 tibble         * 3.1.6      2021-11-07 [1] CRAN (R 4.1.2)
 tidyselect       1.1.2      2022-02-21 [1] CRAN (R 4.1.2)
 usethis          2.1.5      2021-12-09 [1] CRAN (R 4.1.2)
 utf8             1.2.2      2021-07-24 [1] CRAN (R 4.1.2)
 uuid             1.0-3      2021-11-01 [1] CRAN (R 4.1.2)
 vctrs            0.3.8      2021-04-29 [1] CRAN (R 4.1.2)
 whisker          0.4        2019-08-28 [1] CRAN (R 4.1.2)
 withr            2.5.0      2022-03-03 [1] CRAN (R 4.1.2)
 workflowr      * 1.7.0      2021-12-21 [1] CRAN (R 4.1.2)
 xfun             0.30       2022-03-02 [1] CRAN (R 4.1.2)
 xml2             1.3.3      2021-11-30 [1] CRAN (R 4.1.2)
 yaml             2.3.5      2022-02-21 [1] CRAN (R 4.1.2)

 [1] /workspace/.cache/R/renv/library/false.alarm-d6f1a0d1/R-4.1/x86_64-pc-linux-gnu
 [2] /usr/lib/R/library

──────────────────────────────────────────────────────────────────────────────

  1. The term “negative” does not imply that the patient has a “normal” ECG. It means that the “negative” section is not a life-threatening condition that needs to trigger an alarm.↩︎

  2. This is not the same “complexity” from Batista, et al.14, but from Del Rio, et al.15.↩︎