  We give a short introduction to cough detection efforts that were undertaken
during the last decade and we describe the solution for automatic cough
detection developed for the AioCare portable spirometry system. In contrast to
more popular analysis of sound and audio recordings, we fully based our
approach on airflow signals only. As the system is intended to be used in a
large variety of environments and different patients, we trained and validated
the algorithm using AioCare-collected data and the large database of spirometry
curves from the NHANES database by the American National Center for Health
Statistics. We trained different classifiers, such as logistic regression,
feed-forward artificial neural network, support vector machine, and random
forest to choose the one with the best performance. The ANN solution was
selected as the final classifier. The classification results on the test set
(AioCare data) are: 0.86 (sensitivity), 0.91 (specificity), 0.91 (accuracy) and
0.88 (F1 score). The classification methodology developed in this study is
robust for detecting cough events during spirometry measurements. As far as we
know, the solution presented in this work is the first fully reproducible
description of the automatic cough detection algorithm based totally on airflow
signals and the first cough detection implemented in a commercial spirometry
system that is to be published.
