  Atrial fibrillation (AF) is one of the most common arrhythmias with
challenging public health implications. Therefore, automatic detection of AF
episodes on ECG is one of the essential tasks in biomedical engineering. In
this paper, we applied the recently introduced method of compressor-based text
classification with gzip algorithm for AF detection (binary classification
between heart rhythms). We investigated the normalized compression distance
applied to RR-interval and $\Delta$RR-interval sequences ($\Delta$RR-interval
is the difference between subsequent RR-intervals). Here, the configuration of
the k-nearest neighbour classifier, an optimal window length, and the choice of
data types for compression were analyzed. We achieved good classification
results while learning on the full MIT-BIH Atrial Fibrillation database, close
to the best specialized AF detection algorithms (avg. sensitivity = 97.1\%,
avg. specificity = 91.7\%, best sensitivity of 99.8\%, best specificity of
97.6\% with fivefold cross-validation). In addition, we evaluated the
classification performance under the few-shot learning setting. Our results
suggest that gzip compression-based classification, originally proposed for
texts, is suitable for biomedical data and quantized continuous stochastic
sequences in general.
