text:
\section{Introduction}\label{sec:introduction}}

\IEEEPARstart{A}{sthma} is a chronic inflammatory condition of the airways, with over 235 million people \cite{WHO1, WHO2, WHO3} suffering worldwide. The direct cost associated with asthma has risen a significant burden on society and healthcare systems \cite{kopka8, kopka9}. Asthma is a common disease among children and one of the most common chronic conditions. It is characterized by recurrent attacks of wheezing, breathlessness, dyspnea, chest tightness and coughing, known as asthma attacks \cite{kaufman2009strategies}. It deteriorates the quality of life for patients and their families up to a level, leading to increased healthcare cost, poor clinical outcomes and increased morbidity rates \cite{sears1990regular}. The variety of obstructive respiratory diseases \cite{asher1, hornclark} reveals the importance for innovative models that could help patients face their unpleasant condition and enjoy a better quality of life \cite{akinbami2016changing}. There is evidence that adherence to asthma treatment is variable, hindering the proper management of the disease \cite{british1982death}. Detailed constructive feedback from clinicians on inhaler usage may motivate patients to focus more on treatment adherence, which in turn may improve their quality of life, prevent exacerbation and hospitalization and, eventually, reduce mortality rates associated with chronic respiratory diseases \cite{krishnan2004corticosteroid}.\par

Inhaled aerosol therapies are the main treatment of obstructive lung diseases \cite{boutayeb2005burden}. Inhaler based monitoring devices were introduced at the beginning of the 1980s and, since then, have been developed, mainly for the proper assessment of medication adherence. These devices are presented in section \ref{section:hardware}. Aerosol devices deliver a fixed medication dose, rapidly and directly into the airways, from a pressurized canister, containing a medication/propellant mixture \cite{fuller1995diskustm, malmberg2010inspiratory}. The efficient and effective management of asthma is strongly connected with the patient adherence to the prescribed action plan, while reduced adherence has been strongly linked with significant indicators of health degradation. Active feedback may encourage patients to improve their adherence and manage their condition better. For this purpose, specialists have developed methodologies to monitor inhaler users and understand if patients use their inhaler devices with the appropriate technique and at the correct time duration. Audio process phenomenology requires the transformation of the measured data to extract the desired information (section \ref{section:featureextraction}). The current methods exploit machine learning and, mainly, deep learning approaches to develop classification models that, given as input the monitored acoustic signals, automatically recognize the phase of respiration and detect the drug inhalation onset (section \ref{section:classification}). Often, time-frequency analysis of the respiratory signals \cite{cavusoglu2007efficient, sa2002automated, wilson1982algorithms} is performed prior to classification in order to extract a variety of features, critical for extensive analysis. Acoustic analysis of breathing has been employed to detect the different phases of respiration, such as inhalation, exhalation, and drug actuation \cite{hossain2002respiratory, huq2012acoustic, yadollahi2006robust}. Many of these works are related to personalized management services on obstructive respiratory diseases, aiming to provide methodologies for medication adherence monitoring \cite{aggarwal2014use}. Specifically, these studies either focus on device-integrated solutions, using pressure-activated switches \cite{howard2014electronic, pilcher2016validation} or on ambient sound analysis, intelligent systems \cite{holmes2014acoustic}. Despite their coalescent differences, every approach targets the detection of drug actuation and recognition of respiratory events for the right drug assessment and procedure management.\par

Audio processing problems can lead to some complex and intricate approaches, in order to perform pattern extraction of critical information, especially on noisy or sometimes incomplete sound measurements \cite{hartmann2004signals, raichel2006science}. Signal processing techniques can effectively extract useful information. However, they can be pretty difficult to develop. The adherence of patients to their medication intake, in terms of prescribed dosage and careful usage of inhaler devices, is critical for controlling the disease. 24\% of asthma exacerbation and 60\% of hospitalization are caused by poor medication adherence \cite{baarnes2015asthma}. Studies suggest that up to 67\% of clinicians cannot describe the steps correctly or demonstrate correct inhaler usage, so we focus on the optimization of adherence and the management of non-adherence, through the use of systems, with methodologies that consider patient preferences, in treatment and care decisions \cite{arcy25, pritch}. For the experiments, it was used a pressurized metered-dose inhaler (pMDI), where patients were instructed to actuate the canister of the pMDI as they begin a "slow" and "deep" inhalation \cite{chrystyn2009not}. In order to ensure that the medication reaches the lower airways, the inhalation in drug actuation must be steadily below 90 L/min \cite{al2007can, ammari2013optimizing}. Because the majority of patients perform at least one step of the inhalation technique incorrectly (insufficient respiratory effort), systematic training is required to achieve optimal inhaler technique \cite{sulaiman2017objective}. Through breathing, inhalation and exhalation, the respiratory system facilitates the exchange of gases between the air and the blood and between the blood and the body's cells \cite{sims2011aerosol}. Modern signal analysis techniques have been applied to extract features from inhalation sounds that characterize events, such as drug actuation sounds or respiratory flow rate. Hence, we hypothesized that by analyzing the acoustics of inhalation, in a group of patients with a variety of respiratory and non-respiratory diseases, we could assess the accuracy, sensitivity and specificity of the state of the art methods on inhalation sounds' classification \cite{seheult2014acoustic}.

This paper presents an extensive review and discussion on the state-of-the-art methods and tools for acoustic analysis, and content-based audio classification of inhaler sounds on medication adherence, which could be used to improve techniques on aerosol therapy \cite{crocker1997encyclopedia}. The rest of the paper is organized as follows: Section \ref{section:hardware} provides a synopsis on the state of the art of inhaler devices with different system designs. Section \ref{section:dataset} presents the annotation on RDA dataset recordings after the feature extraction procedure, which is constituted in section \ref{section:featureextraction} and has been used on different approaches and the methodological aspects for audio recordings. Section \ref{section:classification} analyzes the different frameworks and architectural components and the methodological aspects, that are used for the detection and recognition of respiratory and actuation sounds from RDA dataset. Section \ref{section:comparison} describes the experimental evaluation of each structure and their accuracy comparisons, while section \ref{section:future} gives recommendations for future directions on acoustic analysis of inhaler sounds, in the field of machine learning and, finally, section \ref{section:conclusions} concludes this study.

\section{Inhaler technique monitoring systems}
\label{section:hardware}

There has been an increasing interest from researchers and software architects for medication adherence monitoring devices. The first inhalation device used for asthma was the pressurized metered-dose inhaler in the 1950s. Today, there are many devices available with different techniques to support the proper drug intake \cite{masoli2004global}. We briefly present representative technologies utilized over time:
\vspace{0.5cm}
\begin{itemize}
\item SmartMist TM is a microprocessor-controlled device, widely used in academic research that optimizes drug deposition in the lung, emitted from metered-dose inhalers (MDIs) \cite{farr1995aerosol, warren1996comparison, rau2005determinants}.
\item Diskus Adherence Logger (DAL) is an inhaler device with a small size sensor, designed to recognize the motion of the dose delivery level in Diskus DPIs and to communicate with the event recorder chip, for control and data uploading to a computer \cite{bogen2004adherence, bogen2005reliability}.
\item The SmartTrack is an innovative adherence monitoring device, for pressurized metered-dose inhalers that consist of an LCD screen and four push buttons that allow the navigation in the device menu \cite{foster2012reliability, chan2017electronic}.
\item The SmartTurbo (Adherium (NZ) Ltd, Auckland, New Zealand) is an electronic monitor that combines its use with a Turbuhaler device (AstraZeneca, UK) and consists of electromechanical sensors to identify the state on the mouthpiece of the inhaler \cite{gradinarsky2014inhalation, pilcher2015three, d2014method}.
\item The Asthmapolis system relies on technology that monitors the location of blister actuations, allowing the user to gain information about the disease, such as date and time of the usage \cite{van2013remote} and to collect timely and geographically specific information about asthma management, with a clear picture of health status \cite{aldridge2011project, van2013monitoring}.
\item The Inspiromatic™ is an innovative approach to inhaler enhancement, based on the real-time inhalation flow measurements \cite{shakshuki2017improving}.
\item Sensohaler is a novel device that incorporates MDIs, with fundamental acoustic sensing functionalities that are used for the prediction of volumetric flow rate \cite{denyer2010adherence}.
\item The T-Haler device is based on another innovative approach for the design of a MDI, with enhanced monitoring key performance characteristics, \cite{shakshuki2017improving}.
\item Furthermore, an integrated system was presented in \cite{nousias2016monitoring}, consisting of three main parts, the monitoring device, the smartphone application and the cloud processing server part.
\end{itemize}
\vspace{0.5cm}

\section{Evaluation dataset}
\label{section:dataset}

The central aim of this research is to identify associations between high-level classification labels and low-level features extracted from audio clips of different semantic activities. We investigate the clinical applicability of different audio-based signal processing methods for assessing medication adherence. The dataset consists of recordings acquired in an acoustically controlled setting, free of ambient indoor environment noise, at the University of Patras. Three subjects, who were familiar with the inhaler technique, participated in the study. The participants were instructed to use the inhaler, as typically performed in a clinical procedure. For each and every participant informed consent was obtained. During breathing and drug actuation, the audio signals were acquired by a microphone attached to the inhalation device, communicating with a mobile phone via Bluetooth. The addition of the adherence monitoring device did not impact the normal functioning of the inhaler, which had a full placebo canister. In total, 370 audio files were recorded with a different duration each, containing an entire inhaler use case, with respiratory flow ranging on 180-240 L/min. Each audio recording was sampled with a 8KHz sampling frequency, as a mono channel WAV file, at 8-bit depth. The audio recordings were segmented and annotated by a human specialist into inhaler actuation, exhalation, inhalation and environmental noise. The obtained segments (of non-mixed states) were of variable length and, for some methods, were further segmented into frames of fixed length for the purposes of feature extraction, as described in section~\ref{section:featureextraction}.The acoustic signal of a typical patient recording is shown in Figure~\ref{fig:spectrogram}.
The constructed database overall consisted of 193 drug actuation segments, 319 inhalation and 620 exhalation segments and 505 noise segments, ready to be used for audio sound recognition using different sets of features.

\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{figures/spectd.png}
    \caption{Audio timeseries colored with ground truth labels (top) and visualization of the corresponding spectrogram, within a sliding window (bottom). Events include inhalation (blue), drug actuation (green), exhalation (red) and environmental noise (black). Window sliding positions might include non-mixed states (window 1) or transitional states, e.g. from inhalation to drug actuation (window 2) and breath holding to exhalation (window 3), respectively. The class label of the sliding windows corresponds to the central point. Reproduced with permission from Pettas et al.\cite{pettas2019recognition}}
    \label{fig:spectrogram}

\end{figure}

\section{Preliminaries on feature extraction and audio descriptors}
\label{section:featureextraction}

Various features have been extracted from audio signals, both in temporal and spectral domain, and have been used as a basis for audio analysis algorithms \cite{duong2015review}. It is typical for audio analysis to extract the features across sliding time windows, in order to capture the class or activity within that particular moment in time. The extraction and selection of robust and descriptive features for specific applications is the main challenge in designing audio classification systems \cite{zhang1998hierarchical, heryanto2011direct}. We have elaborated our work on the characterization of the audio signals, using several spectral features and audio patterns, as proposed in the literature. We first denote a signal as a time series, $x\left(t\right), t=1,...,T$, in the time domain. As the signal is changing through time, it is assumed that on short time scales \comm{,the audio signal has small changes, i.e. }is statistically stationary and thus, statistical features can be extracted through a windowing process, in which the signal is segmented into small, possibly overlapping, time windows (frames) of the same length ($N$). We denote as $\mathrm{x}_{\mathrm{n}}\left(i\right)$ the $i^{th}$ sample in the $\mathrm{n}^{th}$ frame audio signal, where $i=1,...,N$.\par

\subsection{Volume in time domain analysis}

Volume in the time domain, is a reliable indicator for silence detection. Therefore, it can segment audio sequences and determine clip boundaries. It is commonly perceived as loudness since natural sounds are pressure waves, with different amounts of power that modifies them and different distribution for each audio recording. In electronic sounds, the physical quantity is amplitude, and therefore volume is often calculated as the Root-Mean-Square (RMS) of amplitude. Volume of the n$^{th}$ frame is calculated by the following formula:

\begin{equation}
\mathrm{V}(\mathrm{n})=\sqrt{1 / N} \sum_{i=1}^{N} \mathrm{x}_{\mathrm{n}}^{2}\left(i\right)
\end{equation}

\noindent where $\mathrm{V}(\mathrm{n})$ is the volume. Figure~\ref{fig:sound_volume_inhalation} shows the volume of the first recording.

\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{figures/Figure_1.png}
    \caption{Sound wave plot of the first inhalation recording.}
    \label{fig:sound_volume_inhalation}

\end{figure}

\subsection{Zero Crossing Rate analysis}

Zero-Crossing Rate ($\mathcal{ZCR}$) is defined formally as the number of time-domain zero-crossings, within a defined region of signal, divided by the number of samples of that region \cite{gouyon2000use}: in the context of discrete-time signals, a zero crossing is said to occur if successive samples have different algebraic signs. The zero-crossing finds the rate at which the signal changes from positive to negative and vice-versa \cite{bachu2010voiced, bachu2008separation}. In some cases, only the "positive-going" or "negative-going" crossings are counted, rather than all the crossings, since, logically, between a pair of adjacent positive zero-crossings, there must be one negative zero-crossing \cite{shete2014zero}. This feature has been used extensively in speech recognition and music information retrieval to classify percussive sounds.\par

\begin{align*}
\mathcal{ZCR} = \frac{1}{T-1}\sum_{t=1}^{T-1} J\{x\left(t\right)x\left(t-1\right)<0\}
\end{align*}

\noindent where $x\left(t\right)$ is a time domain signal of length $T$ and $J\{y\}$ is a logical function returning one, if its argument is true and zero, otherwise \cite{bitopi}.

\subsection{Spectrogram analysis}

Any sound signal can be expressed in the frequency spectrum, which shows the average amplitude of various frequency components in the audio signal and the frequency distribution. To obtain frequency domain features, the spectrogram of an audio clip in the form of Short-Time Fourier Transform (STFT) is calculated for each audio frame. The spectrogram is used for the extraction of two features, namely frequency centroid and frequency bandwidth.\par

\subsection{Cepstrum analysis}

The first paper on cepstrum analysis \cite{bogert} defined the cepstrum as "the power spectrum of the logarithm of the power spectrum". The cepstrum results from the Inverse Discrete Fourier Transform (IDFT) of a signal's log magnitude of the Discrete Fourier Transform (DFT). It has been used in speech analysis for determining voice pitch (by accurately measuring the harmonic spacing), but also for separating the formants (transfer function of the vocal tract) from voiced, and unvoiced sources, which led quite early to similar applications in mechanics \cite{oppenheim}. The definition of the complex cepstrum is:

\begin{equation}
C_c\left(\tau\right) = \mathscr{F}^{-1}\left\{\log \left( F \left( f \right) \right) \right\} = \mathscr{F}^{-1}\left\{\ln \left( A\left( f \right) \right) + j\phi\left( f \right)\right\}
\end{equation}

\noindent where $\mathscr{F}^{-1}$ is the IDFT and $F$ is the DFT, in terms of the amplitude and phase of the spectrum \cite{robert}.\par

\subsection{Mel Frequency Cepstral Coefficients Analysis and Power Spectral Density}

Audio feature extraction is used to decrease the dimensionality of the input vector while maintaining the discriminating power of the signal. It is an important part to prepare data for the sound identification process, and this kind of analysis is derived from the cepstral representation of audio data \cite{ganesh}. A systematic study of various spectral features can be found in (Kinnunen 2004) \cite{kinn}. The Mel Frequency Cepstral Coefficient (MFCC) feature extraction is a technique in sound recognition that is based on the frequency domain of Mel scale for human ear scale \cite{ruinskiy}. MFCC's extraction is a significant technique, also, due to efficient computation schemes and its robustness in the presence of different noise \cite{sahidullah2012design}. To compute the MFCC's, a Hamming window is multiplied with the overlapping segments after windowing, and the Fast Fourier Transform (FFT) is computed for every frame. The equation for Hamming window sequence can be defined by:

\begin{equation}
w\left(n\right) = \alpha - \beta\cos(\frac{2 \pi n}{N-1})
\quad \textrm{for} \quad
-\frac{N-1}{2}\leq n \leq \frac{N-1}{2}
\end{equation}

\noindent with $\alpha=0.54$ and $\beta=1-\alpha=0.46$. For each frame we take the periodogram-based Power Spectral Density (PSD) estimation:

\begin{equation}
\hat{P}_i\left(k\right) = \frac{1}{N}\abs{X_i\left(k\right)}^2
\end{equation}

where $X_i\left(k\right)$ is the complex DFT of the signal $x\left(n\right)$, with $N$ samples:

\begin{equation}
X\left(k\right) = \sum_{n=\frac{N}{2}-1}^{\frac{N}{2}}x\left(n\right)\exp\left(-j2 \pi k\frac{n}{N}\right)
\end{equation}

The power spectral density function helps calculate the total power contained in each spectral component of a specific signal. Power spectrum of any time-domain signal $x\left(t\right)$, helps to determine the distribution of the variance of data $x\left(t\right)$, over frequency domain, in the form of spectral components, into which the actual signal can be decomposed \cite{saini2015power}. This is motivated by the human cochlea (an organ in the ear), which vibrates at different spots, depending on the frequency of the incoming sounds. Depending on location in the cochlea that vibrates, different nerves fire, informing the brain that specific frequencies are present. Therefore, the estimated PSD of the signal is related to the modulus of its DFT \cite{nasser}.\par

After this step, we continue the calculations, with the spectrum segmented into a number of critical bands employing filterbanks. The filterbank, typically, consists of overlapping triangular filters, which are spaced linearly, in a perceptual Mel scale. Then, we calculate the Mel filterbanks in order to examine how much energy exists in various frequency regions. The Mel scale determines how to space the filterbanks and how wide to make them. It relates the perceived frequency of a pure tone to its actual measured frequency. Once we have the filterbank energies, we compute their logarithm. The logarithm allows us to use cepstral mean subtraction, which is a channel normalization technique. Finally, Discrete Cosine Transformation (DCT) is applied to the logarithm of the filterbank outputs, which results in the raw MFCC vector \cite{sirko}. Because our filterbanks are all overlapping, the filterbank energies are quite correlated with each other. The DCT decorrelates the energies, so as diagonal covariance matrices can be used to model the features in the various classifiers.

There can be variations on this process, for example, differences in the shape or spacing of the windows used to map the scale \cite{zheng2001comparison} or addition of dynamics features, such as "delta" and "delta-delta" (first- and second-order frame-to-frame difference) coefficients. Exponentiating the log Mel-filter bank spectrum before the cepstrum computation, can significantly reduce the sensitivity of the cepstra to spurious low energy perturbations \cite{tyagi2005desensitizing}. The difference between the cepstrum and the Mel-frequency cepstrum is that in the MFCC, the frequency bands are equally spaced on the Mel scale, which approximates the human auditory system's response more closely, than the linearly-spaced frequency bands, used in the normal cepstrum. This frequency warping can permit for better representation of sound in audio compression. MFCC's have been successfully used in speech and music applications, playing a central part in recent efforts to complete machine audition \cite{chad}.\par

\subsection{Wavelet Transform analysis}

The wavelet transform can construct a time-frequency representation of a signal that offers very good time and frequency localization. The wavelet transform, with the wavelet $\psi$ of a signal $x(t)$ is defined as:

\begin{equation}
W_{\psi}^{x}(a, b)=\frac{1}{\sqrt{c_{\psi}|a|}} \int_{-\infty}^{\infty} x(t) \psi\left(\frac{t-b}{a}\right) d t
\end{equation}

\noindent where $a$ is called dilatation and $b$ translation parameter. The Morlet wavelet, consisting of a sinusoid multiplied by a Gaussian window, is commonly used, because its scale-frequency relationship requires less computation, as the peak frequency is equal to the center frequency of the wavelet. The Morlet wavelet $\psi$, which is sometimes called Gabor wavelet, has some impressive mathematical and biological properties and is given by:

\begin{equation}
\psi(t)=\frac{1}{\pi^{\frac{1}{4}}}\left(e^{i 2 \pi f_{0} t}-e^{-\left(i 2 \pi f_{0}\right)^{2} / 2}\right) e^{-t^{2} / 2}
\end{equation}

\noindent where $f_{0}$ is the center frequency of the mother wavelet \cite{bussow2007algorithm}.\par

\subsubsection{Continuous Wavelet Transform}

In definition, the Continuous Wavelet Transform (CWT) is a convolution of the input data sequence, with a set of functions generated by the mother wavelet. It provides an over-complete representation of a signal by letting the translation and scale parameter of the wavelets vary continuously \cite{reddy2014object, selesnick2005dual}. The convolution can be calculated in the time-domain or in the frequency-domain, by using an FFT algorithm.\par

For the STFT, a fixed width segment size controls the time-frequency resolution trade-off. This results in a single resolution in time and a single resolution in frequency, regardless of the rendered frequency. In contrast, wavelet analysis is a multi-resolution method. The time-frequency resolution is not constant but varies with frequency. Multi-resolution analysis was designed for the common condition, where high-frequency components exist for a short duration within a signal and low-frequency components are more persistent. Short-lived high frequency components need strong time localization. In order to achieve this, the frequency resolution of high frequency components will be diminished. On the other hand, long-lived low frequency components can tolerate poorer time resolution, but require effective frequency resolution. Low-frequency components, often determine the significant part of a signal's character and these properties will be best quantified if the frequency resolution is as satisfactory as possible. More references on the CWT can be found in Appendix \ref{appendix:CWT}.\par

\section{Respiratory and inhaler sounds classification}
\label{section:classification}

We provide the flow of the research in the topic we discussed, mainly with a chronological, pictorial representation of the machine learning methods, that we developed with the presented dataset and we evaluated the accuracy of each algorithm. We try to cover a large part of the existing material, so all points of interest need to be included to capture from one corner of the topic to the current status of the research and make the research of broad interest, but focusing only on an inhaler and respiratory sounds. The elements of the pipeline will be executed in parallel and in a time-sliced fashion, at some points. In some approaches, the data must be transformed to take advantage of the value it can deliver, so it can continuously improve the accuracy of the models and achieve successful results \cite{mcfarland2006bci}. We tried to have the appropriate data quality, reliability and accessibility. Metadata extraction is correlated with the captured data and provides descriptive and targeted information about the object and the data itself.\par

\subsection{Classical machine learning algorithms for feature-based respiratory signals classification}

\subsubsection{Decision Tree with CWT}

Chronologically, the first algorithm that was employed to identify actuation sounds was presented in \cite{taylor2014acoustic} and utilized Decision Trees (DTs), with CWT for inhalation classification. The CWT was calculated using a Morlet Wavelet (MW) with an adjustable parameter of $20$. A peak assessment routine was then employed to detect and assess peaks, exceeding a threshold $\theta_1=0.38$. Each peak was initially marked as a potential actuation plume. Power values were taken at specific time distance ($56$ ms), before and after the peak point, to observe if the power decreased by a given threshold ($\theta_2=25\%$) in comparison to the peak value, to flag it as an actuation plume. It was observed that the actuation acoustic signal was of a very small duration (100-150ms). The wavelet variance is calculated, so that different datasets may be compared at different scales:

\begin{equation}
V(a)=\frac{1}{n} \sum_{j=1}^{n} W^{2}\left(a, x_{j}\right)
\end{equation}

\noindent where $W^{2}\left(a, x_{j}\right)$ is the squared wavelet coefficient, associated with scale $a$ at data point $x_{j}$ and $n$ is the number of data points. From this definition, wavelet variance is a function of scale. Bradshaw and Spies \cite{bradshaw1992characterizing} pointed out that "high values of wavelet variance, at a given scale, reflect the presence of a greater number of peaks or a greater intensity of the signal, or both".\par

\subsubsection{Quadratic Discriminant analysis}

In 2018, a Quadratic Discriminant Analysis (QDA) model was employed \cite{taylor2018objective}, for audio-based analysis of respiratory sounds. The algorithm was composed of two phases, training and testing, to automatically recognize the sound events. In both training and testing phases, the inhaler audio signal was band-pass filtered at $140$ to $22000$ Hz, to emphasize the events and to reduce the external noise. The audio signals were divided into frames of $40$ ms duration with $20$ ms overlap. The DC offset (mean amplitude displacement from zero) was removed from each frame. Thirty audio-based features from time and spectral domains were extracted, for each frame. The extracted features are: $12$ MFCC's, $10$ Linear Predictive Coding (LPC) coefficients, PSD, ZCR and a high frequency (over $15$ kHz) power value, estimated using the CWT. Since the Flo-Tone device generates a harmonic sound during inhalation, a harmonic feature was also extracted. This harmonic feature was calculated as the peak value of the frame's auto-correlation function, searched in the range of 500–600Hz.\par

Classifying between two multivariate normal populations leads to the idea of discriminant analysis, which is essentially the Bayes classifier for the problem, that constructs a combination of the features. The features
from two classes follow multivariate normal distributions, with different means $\mu_{i}$, with precision matrices $\Omega_{i}=\Sigma_{i}^{-1}$, with $i = {1, 2, ..., Q(Y)}$ (where $Q(Y)$ is the cardinal number of the set $Y$ of the classes. In this, high dimensional setting, these matrices can be estimated only in presence of sparsity.\par

Consider observing training data $\left(X_{m}, Y_{m}\right), m=1, \ldots, n$ where $X_{m} \in \mathfrak{X}$ and $Y_{m} \in\{0,1, .., n\}$ and
$$
X_{m} \mid\left\{Y_{m}=k\right\} \sim p_{i}(x), \text { if } Y_{m}=i
$$
for density $p_{i}$. A classification rule (or a classifier) $\phi$ is a map $\phi: \mathfrak{X} \rightarrow[0, ..., Q(Y)]$, such that $\phi(x)$ stands for the probability of classifying a new observation to Class $i$. The misclassification rate of a classifier $\phi$ is given by $r(\phi)=\mathrm{E}[Y(1-\phi(X))+(1-Y) \phi(X)]$.\par

The idea of the one-versus-the-rest method is as follows: to get a $K$-class classifier, first construct a set of binary classifiers $C_{1}, C_{2}, \cdots, C_{K}$. Each binary classifier is first trained to separate one class from the rest and, then, the multi-class classification is carried out according to the maximal output, of the binary classifiers. Since the binary classifiers are obtained by training on different binary classification problems, it is unclear whether their real-valued outputs (before thresholding) are on comparable scales \cite{scholkopf2002learning}. In practice, however, situations often arise where several binary classifiers assign the same instance to their respective class (or where none does). In addition, binary one-versus-the-rest classifiers has been criticized for dealing with somewhat asymmetric problems \cite{scholkopf2002learning}.\par

\subsubsection{Support Vector Machines}

Support Vector Machines (SVM) are based on statistical learning theory \cite{vapnik1998support} and have shown to be one of the most robust supervised learning methods. Their simplicity comes from the fact that they apply a simple linear method to the data, but in a high-dimensional feature space are non-linearly related to the input space. In binary classification, only the decision boundaries of the first class are to be known and the rest (complement of first-class) is considered as second class, whereas in multi-class classification, several decision boundaries need to be calculated for this reason, which may lead to increase of error probability. SVM are highly accurate and able to model complex non-linear decision boundaries. The SVM classifier may be applied both to linearly and non-linearly separable data, with the use of kernel transformations. Specifically, it transforms the data to a higher dimension, from where it can identify a hyperplane that separates the data.\par

\subsubsection{Random Forest}

The Random Forest (RF) algorithm trains several tree-like classifiers \cite{moham} and aggregates results, by majority voting. The RF usually illustrates high accuracy and processing speed, though the correlation or/and independence of trees may affect the accuracy of the outcomes. The RF classifier draws $n$ tree bootstrap samples from the original data and, among the variables, the best split is selected. The accuracy of RF overall depends on the strength of each tree and the correlation between any two trees. Each tree in RF can also be constructed by a bootstrap sample from the data, using a small set of randomly selected attributes.

\subsubsection{Adaboost}

Boosting was proposed by Freund and Schapire in 1990 \cite{freund1999short}. It is an efficient instrument for improving the predictive ability of a learning system and a most typical method in coordinating learning. Adaboost is the most common boosting algorithm. It usually employs decision tree models as weak learners and evaluates them sequentially \cite{hastie2009multi}. Subsequent DTs are updated in favour of those samples miss-classified by previous decision trees.\par

Preparing training sets $\left(x_{1}, y_{1}\right), \ldots,\left(x_{n}, y_{n}\right) \cdot x_{i} \in X$, $X$ represents a certain domain or instance space and each member is a training example, with a label. Initially, it was a two-class problem of learning. In going from two-class to multi-class classification, most boosting algorithms have been restricted to reducing the multi-class classification problem to multiple two-class problems, e.g. as shown in early works by Freund, Schapire, Singer, et al. \cite{freund1997decision, schapire1997using, schapire1999improved, allwein2000reducing} and Friedman, et al. \cite{friedman2000additive, friedman2001greedy}. The weights of all the training examples are initially set to be $1 / \mathrm{m}$ equally. Adaboost conducts $T$ times of iteration through repeatedly calling a weak learning algorithm. The weight of each instance would increase, while the training fails each time, so as to enable the weak learner to focus on the instance of failure, in training. As per $D_{t}$ distribution, the weak learner finds appropriate weak hypothesis $h_{t}: \quad X \rightarrow R$, thus, predicting function sequence is gained, at this point. In the simplest case, if the scope of each $h_{t}$ is two-valued $\{-1,+1\}$, the task of the learner is to minimize the error. Combining $T$- weak hypotheses, the final predicting function (hypothesis) $H$ is gained, after $T$ times of circulation, with a weighted majority voting method. The learning accuracy rate of a single weak learner is not high enough \cite{chengsheng2017adaboost}, however, with the application of Boosting algorithm, the accuracy rate of the final result is to be improved. The Adaboost algorithm is described in detail in appendix \ref{appendix:Adaboost}.\par

\subsubsection{Gaussian Mixture Models}

Gaussian Mixture Models (GMM's) can be employed to approximate any Probability Density Function (PDF), given a number of components. It is proposed a novel content based audio classification approach, for monitoring pMDI medication adherence \cite{nousias2018mhealth}, which exploits the separability of the Cepstrogram features, using a GMM classifier. GMMs are statistical models for representing normally distributed sub-populations, within an overall population and are used in many pattern recognition applications. For each class, a separate model is trained, by fitting the corresponding feature vectors to a GMM, with parameters $\{a_i, \mu_i, C_i\}$, $i \in \{1,...,K\}$, where $K$ is the number of components, $a_i$ is the mixture weight of component $i$, $\mu_i$ is the d-dimensional vector containing the mean values for each feature and $C_i$ is the corresponding co-variance matrix. The Gaussian mixture density $p\left( \nu | \lambda_n \right)$ is modeled as a linear combination of multivariate Gaussian PDFs, where $\nu$ is a feature vector and $\lambda_n$ is the GMM, corresponding to class $n$. In order to classify a test feature vector, we derive the $P\left(\nu|\lambda_n\right)$, for each class. The test feature vector is assigned to the class $n$, with the greatest likelihood $P\left(\nu|\lambda_n\right)$. An expectation maximization (EM) approach is utilized to derive the parameters $K_n$, $\{a_i, \mu_i, C_i\}$ for the GMM $\lambda_n$, corresponding to the class $n$ that best fit the input data.\par

After the optimal parameters, for the GMMs, have been computed and given $d$ the number of features, $K$ the number of components of the $i^{th}$ feature vector $v_i$ and $\lambda_n$ the GMM of class $n$, we get:

\begin{equation}
    P\left(v_i|\lambda_n\right) = \sum_{i=1}^{K}{{a_i}^n{p_i}^n{\left(v\right)}}
\end{equation}

where ${a_i}^n$ are the mixture weights to satisfy the constraint:

\begin{equation}
    \sum_{i=1}^{M}{{a_i}^n} = 1, \quad {{a_i}^n} \leq 0
\end{equation}

Finally, and after the $P\left(v|\lambda_n\right)$ for the test feature vector $v$ and for each class $n$ is estimated, the test feature vector is assigned to the class $n$ with the greatest likelihood. Then, we have the relevant feedback. This procedure lies in the assumption that the initial dataset was compiled by a small group of people. For the derivation of the GMM, through the EM approach, we refer to the appendix \ref{appendix:GMM}.

\subsection{Deep Learning Models}

Neural Networks (NNs) have been employed in the past for a variety of classification problems and have shown significantly accurate results in medical applications \cite{geman2013nonlinear, kiranyaz2015real} and general audio classification problems \cite{lee2009unsupervised, abdel2012applying}. The CNNs can adapt to the characteristics of the training dataset and create a hierarchy of increasingly complex features \cite{ji20123d}, while at the same time, they illustrate relatively fast and consistent convergence in the training process. This model is robust in automatically learning the intrinsic patterns from the data, which can both prevent time-consuming manual feature engineering and capture hidden intrinsic patterns more effectively. Moreover, a CNN is more capable of discovering intricate patterns in high-dimensional data, compared with manual feature engineering. A pooling layer is introduced in each stage to merge similar features, reducing the feature dimension and dealing with some motif variations due to small signal variability (shifts and distortions).\par

\subsubsection{Convolutional Neural Network approaches}

In classical machine learning based direction, it is proposed an algorithmic methodology, using Convolutional Neural Networks (CNNs), intending to produce more accurate results, for real life environments, as opposed to controlled laboratory conditions with reduced levels of noise. This type of models has been established as a reliable, data-driven approach for time series and image classification \cite{hussain2018swishnet, kopuklu2019real}. Also, the authors in \cite{krizhevsky2012imagenet} have demonstrated their accuracy and efficiency in classification tasks, while strengthening the basis for CNN architectures.\par

An important CNN approach \cite{kikidis2015utilizing}, has a deep architecture that is consisted of two convolutional layers, of 16 1D kernels of size $100$, followed by subsampling layers of size $2$. Two fully connected layers of size $256$ and $16$, each of which was subjected to 50\% dropout in the training process, lead to the output of two distinct states. For all layers of the CNN, RELU  was selected as the activation function, in order to reduce the computational complexity of the algorithm. Furthermore, the initialization of the network's parameters was performed, using a random generator of uniform distribution. Finally the training of the 1D CNN utilized Adam and was based on the categorical cross-entropy, between the predictions and the target values.\par

Later, a fast data-driven approach \cite{ntalianis2019assessment,ntalianis2020} was proposed, based on 2D convolutional neural networks. The benefits according to the authors can be summarized in the following points: a) The presented approach is applied directly on the time domain to gain from reduced computational complexity. b) An extensive execution time evaluation study demonstrates that the presented approach is faster than most of the state-of-the-art methods. c) Convolutional deep sparse coding speeds up the computational graph, aiming to allow the real-time implementation. Specifically, the architecture utilizes three convolutional layers with each layer constituted by a max pooling layer and a dropout function \cite{wu2015max}. The output is fed to a set of four dense layers. To compute the loss of each model, it is used categorical cross entropy. Furthermore, the stride is set to one and it was used zero padding to keep the shape of the output of each filter, constant. By processing an audio recording, a vector of $n$ samples is created, reshaped in a two-dimensional array.\par

\subsubsection{LSTM analysis and implementation}

In this approach \cite{pettas2019}, deep layers were added to the network. The proposed sequential architecture, in Figure~\ref{fig:architecture} consists, initially, of one layer of LSTM memory cells, with each one consisting of $h=64$ units. After the LSTM input layer, a dropout layer \cite{srivastava2014dropout} is introduced, in order to reduce overfitted parts after training, with dropout rate set to $0.3$, followed by a flatten layer and a dense output layer, that returns a $4 \times 1$ vector. Finally, a softmax activation function is used. The model is optimized using binary cross-entropy loss \cite{liu2017learning} and the Adam optimizer \cite{kingma2014adam}.\par

\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{figures/LSTM_Arch.png}
    \caption{Architecture of the LSTM network.}
    \label{fig:architecture}
\end{figure}

The spectrogram was used as a tool to develop a classifier of inhaler sounds. It is swept across the temporal dimension, with a sliding window with length $w=15$, moving at a step size equal to $\mathbf{1}$ window. In order to form the training instances, we segment $\mathbf{S}$ into time windows of size $N_f\times T$ and assign a class to each one of them, according to the class of the central point of the window, as presented in Figure~\ref{fig:spectrogram}. Each training example $\mathbf{W}_k$ is defined as:

\begin{equation}
  \mathbf{W}_k \in \mathcal{R}^{ N_F \times T}= (\mathbf{S}_{i j})_{\substack{1 \le i \le N_F\\ k-w \le j \le k}}
\end{equation}

The training set is organized in microbatches $\mathbf{B}$, so that $\mathbf{B} \in \mathcal{R}^{b\times (T\times N_F)}$ (with $b=25$ in our experiments). The input tensor can be defined as $\mathbf{X} \in \mathcal{R}^{n \times w \times F}$, where $n=25$ is the minibatch size, $w=25$ is the window size and $F=42$ is the dimension of spectrogram feature vector.\par

Extensive hyper-parameter optimization took place, to define the number of hidden units, the number of dropout rate and the minibatch size. By observing the performance of the network on the validation set, we stopped training at 70 epochs, to avoid over-fitting. The testing loss increases and the average testing accuracy stabilizes after around 70 epochs.\par

\section{Comparative Analysis of the algorithmic approaches}
\label{section:comparison}

\subsection{Simulation setup and validation settings}

The Respiratory and Drug Actuation Benchmark is a publicly available benchmark suite\footnote{https://gitlab.com/vvr/monitoring-medication-adherence/rda-benchmark} employed to carry the following study. We compare the classification performance of the aforementioned important and widely used machine learning and deep learning algorithms, namely the Random Forests (RF), Support Vector Machines (SVM), Adaboost, Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (LSTMs). They were evaluated with spectrogram, cepstrogram and MFCC features. CNNs were directly applied on timeseries values aiming to demonstrate their capability to provide dependable solutions at lower execution times.\par

A main differentiation parameter in validation comes from the availability of previous recordings, from a specific individual. It is expected that prior information can increase the classification accuracy, however it puts additional burden in the usage of the monitoring system, since it requires the collection of data every time a new patient wants to test the framework.\par

Firstly, we consider the \textit{Multi Subject} modeling approach, denoted as \textit{MultiSubj}. In this case, the recordings of all subjects are used to form a large dataset, which is divided in five equal parts used to perform five-fold cross-validation, thereby allowing different samples from the same subject to be used in training and test set, respectively. This validation scheme was followed in previous work \cite{ntalianis2019assessment} and thus performed, also, here for comparison purposes.\par

The second case includes the \textit{Single Subject} setting, in which the performance of the classifier is validated through training and testing, within each subject's recordings. We denote such models, as \textit{SingleSubj}. Specifically, the recordings of each subject are split in five equal parts, to perform cross-validation. The accuracy is assessed for each subject separately and, then, the overall performance of the classifier is calculated by averaging the three individual results.\par

The third evaluation setting refers to the case, when no previous recordings for the testing subject are available, thus samples from other subjects are used. This is the \textit{leave-one-subject-out (LOSO)} approach that illustrates how well the trained network can generalize to individuals that it never saw before, during training. \textit{LOSO} models facilitate the use of the monitoring system since they don't require a data pre-collection phase and they also have the lowest risk of over-fitting. However, if the inter-subject variability is high, they might not adapt well, especially if the number of training subjects is small, as in our case. With this approach we use the recordings of two subjects for training and the recordings of the third subject for testing. This procedure is completed, when all subjects have been used for testing, and the accuracy is averaged to obtain the overall performance of the classifiers.\par

Furthermore, a new parameter was brought into the comparison, the testing dataset mixing. A non mixed setup means that each audio segment, in the testing set, consists of a single class, but in a mixed setup each testing set sample emanates from a sliding window that naturally includes parts belonging to multiple classes. In this case, the class of an audio segment is the class of the central sample.\par

\subsection{Key performance indicators}

Table~\ref{table:results:summarization} summarizes the classification accuracy for drug, exhalations and inhalations across all validation setups. Out of a superficial examination no method is outright better, but key performance indicators need to be established. Multi-subject and single-subject settings indicate how successful the classifier is, if the user has participated previously in the sampling process. LOSO setting is the closest to real situation setting, since a commercial classifier would not assume that a new user had already submitted samples to the training process. Even though a feedback loop can improve accuracy \cite{nousias2018mhealth} such a process cannot be a prerequisite. As a result, LOSO performance is the most representative. Furthermore, between mixed and non-mixed, the first is closer to real situation, since the non-mixed setup assumes that the position of audio segments containing a certain audio event is known before the classifier is applied. Furthermore, tables \ref{table:results:drug_analysis} and \ref{table:results:exhale_inhale} present the performance of classifiers in drug detection and exhalation-inhalation differentiation. Again, the LOSO-mixed setup is the most representative of reality. In short the key performance indicators can be summarized in the following list:
\begin{itemize}
    \item Non-mixed multisubject accuracy to exceed 96\%   (Table~\ref{table:results:summarization})
    \item The highest non-mixed LOSO accuracies should be highlighted (Table~\ref{table:results:summarization})
    \item The highest mixed multisubject accuracies should be highlighted (Table~\ref{table:results:summarization})
    \item The highest mixed LOSO accuracies should be highlighted (Table~\ref{table:results:summarization})
    \item The highest drug analysis mixed and non-mixed sensitivity should be highlighted (Table~\ref{table:results:drug_analysis})
\end{itemize}
Metrics to measure the performance of the compared classifiers are accuracy , sensitivity and specificity. For the sake of self completeness
accuracy=(TP+FP)/(TP+FP+TN+FN) ,
sensitivity=TP/(TP+FN), specificity=TP/(TP+FP),
where: \\
TP = The number of positive correct identifications\\
TN = The number of negative correct identifications\\
FP = The number of positive incorrect identifications\\
FN = The number of negative incorrect identifications\\

\subsection{Results}

Close inspection of Table~\ref{table:results:summarization} reveals that no method clearly outperforms the others. The performance of data driven approaches largely depends on the dataset and the pre-processing steps, however, since all the approaches were trained with the same dataset we are able to quantify which of them can capture in a more efficient way, the individual characteristics. In general, for all methodologies the multisubject approach yields the highest score. This means that if a user's data have been included in the training process, the success probability climbs to a level near to 100\%.  Given the KPIs, defined in the previous section, LSTM-SPECT, GMM-CEPST, SVM-SPECT and SVM-MFCC achieve the highest accuracies, greater than 96\%, in the multisubject setting.\par

Examining the LOSO accuracy, which represents better real life scenarios, we can distinguish in the non-mixed setup the LSTM-SPECT and CNN-TIME approaches. It is also notable that RF-MFCC captures 100\% drug detection accuracy. The rest of the approaches demonstrate high variation of performance, across classes. Another notable point is the LOSO mixed setup, where we assume a random window selection process, allowing multiple classes to be present within the same window. It is remarkable that RF-SPECT, RF-MFCC, ADABOOST-MFCC and LSTM-SPECT demonstrate more than 70\% detection accuracy for all classes.
However, the results of this table reveal that no method can easily tackle the real life scenario challenge.

Further insight is provided by Table~\ref{table:results:drug_analysis}. Measuring sensitivity
is highly important since it reveals the rate of true positive in drug detection. In the multi-subject, non-mixed setup, GMM-MFCC (100.0\%), LSTM-SPECT (98.8\%), SVM-MFCC (94.975\%) SVM-SPECT(94.059\%), GMM-SPECT (93.401\%) and RF-SPECT (94.03\%) are viable solutions. However, in the LOSO non-mixed setup the outcome is different with RF-CEPST (77.778\%), GMM-SPECT (83.33\%), CNN (77.7\%) and LSTM-SPECT (77.941\%) outperforming other methods. Reaching common grounds RF-CEPST, LSTM-SPECT are quite balanced solutions, since they, also, cover the aforementioned criteria. Furthermore, on LOSO mixed sensitivity is low for every method. The GMM-SPECT approach is the highest one only to yield 21.15\%. Regarding inhalation-exhalation differentiation, the results are presented in Table~\ref{table:results:exhale_inhale},  all methods preform adequately, with a few of them achieving a near to 98\% performance, in LOSO mixed setup. Comparison with literature is not easily possible since different dataset and pre-processing steps highly affect the accuracy. Table~\ref{result:SOA} presents the self-reported accuracy of other studies.

To summarize, a combination of methods can sufficiently answer the question of which method better differentiates inhaler sounds and the performance highly depends on the dataset annotation and on the dataset size. In all cases, it helps the scenarios when the patient is also a participant. The latter was also proven in a previous study, that proposed a relevance feedback mechanism \cite{nousias2018mhealth}.

\begin{table*}
\centering
\caption{Accuracy summarization}
\label{table:results:summarization}
\resizebox{0.85\textwidth}{!}{
\begin{tabular}{@{}|lllllllllll|@{}}
\toprule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{}          & \multicolumn{3}{l|}{Multi subject $^{*}$}                                                                                & \multicolumn{3}{l|}{Single subject}                                                     & \multicolumn{3}{l|}{LOSO  $^{**}$}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{}          & \multicolumn{1}{l|}{Drug}                                    & \multicolumn{1}{l|}{Exhale}                                  & \multicolumn{1}{l|}{Inhale}                                  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & \multicolumn{1}{l|}{Drug}                                    & \multicolumn{1}{l|}{Exhale}                                  & Inhale                                  \\ \midrule
\multicolumn{11}{|l|}{Random Forests}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{97.927}} & \multicolumn{1}{l|}{92.097}                                  & \multicolumn{1}{l|}{94.984}                                  & \multicolumn{1}{l|}{98.907} & \multicolumn{1}{l|}{92.689} & \multicolumn{1}{l|}{93}     & \multicolumn{1}{l|}{70}                                      & \multicolumn{1}{l|}{80.591}                                  & 91.597                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{84.399}                                  & \multicolumn{1}{l|}{87.343}                                  & \multicolumn{1}{l|}{89.928}                                  & \multicolumn{1}{l|}{83.899} & \multicolumn{1}{l|}{89.498} & \multicolumn{1}{l|}{88.246} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{89.024}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{73.445}} & \cellcolor[HTML]{DBF2A5}\textbf{83.788} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{91.192}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.266}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.238}} & \multicolumn{1}{l|}{93.989} & \multicolumn{1}{l|}{94.987} & \multicolumn{1}{l|}{95}     & \multicolumn{1}{l|}{70}                                      & \multicolumn{1}{l|}{86.92}                                   & 94.958                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{62.588}                                  & \multicolumn{1}{l|}{92.414}                                  & \multicolumn{1}{l|}{84.287}                                  & \multicolumn{1}{l|}{64.35}  & \multicolumn{1}{l|}{90.53}  & \multicolumn{1}{l|}{84.648} & \multicolumn{1}{l|}{53.049}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{77.674}} & \cellcolor[HTML]{DBF2A5}\textbf{78.549} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{95.337}                                  & \multicolumn{1}{l|}{95.645}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.552}} & \multicolumn{1}{l|}{96.175} & \multicolumn{1}{l|}{94.778} & \multicolumn{1}{l|}{96}     & \multicolumn{1}{l|}{100}                                     & \multicolumn{1}{l|}{83.122}                                  & 91.597                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{79.221}                                  & \multicolumn{1}{l|}{92.831}                                  & \multicolumn{1}{l|}{82.108}                                  & \multicolumn{1}{l|}{78.845} & \multicolumn{1}{l|}{91.861} & \multicolumn{1}{l|}{80.921} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{75.61}}  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{77.071}} & \cellcolor[HTML]{DBF2A5}\textbf{75.693} \\ \midrule
\multicolumn{11}{|l|}{GMM}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{95.337}                                  & \multicolumn{1}{l|}{84.516}                                  & \multicolumn{1}{l|}{95.611}                                  & \multicolumn{1}{l|}{96.175} & \multicolumn{1}{l|}{83.29}  & \multicolumn{1}{l|}{95}     & \multicolumn{1}{l|}{40}                                      & \multicolumn{1}{l|}{77.637}                                  & 94.118                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{85.803}                                  & \multicolumn{1}{l|}{74.293}                                  & \multicolumn{1}{l|}{93.079}                                  & \multicolumn{1}{l|}{86.017} & \multicolumn{1}{l|}{78.715} & \multicolumn{1}{l|}{92.384} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{72.866}} & \multicolumn{1}{l|}{63.384}                                  & \cellcolor[HTML]{DBF2A5}\textbf{86.997} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{95.337}                                  & \multicolumn{1}{l|}{95.617}                                  & \multicolumn{1}{l|}{95.925}                                  & \multicolumn{1}{l|}{95.628} & \multicolumn{1}{l|}{95.251} & \multicolumn{1}{l|}{96}     & \multicolumn{1}{l|}{50}                                      & \multicolumn{1}{l|}{80.169}                                  & 60.504                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{72.984}                                  & \multicolumn{1}{l|}{90.183}                                  & \multicolumn{1}{l|}{75.486}                                  & \multicolumn{1}{l|}{72.172} & \multicolumn{1}{l|}{87.908} & \multicolumn{1}{l|}{76.566} & \multicolumn{1}{l|}{42.683}                                  & \multicolumn{1}{l|}{64.026}                                  & 32.007                                  \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{5.699}                                   & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{99.355}} & \multicolumn{1}{l|}{60.815}                                  & \multicolumn{1}{l|}{10.929} & \multicolumn{1}{l|}{98.172} & \multicolumn{1}{l|}{85}     & \multicolumn{1}{l|}{0}                                       & \multicolumn{1}{l|}{96.203}                                  & 31.933                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{11.018}                                  & \multicolumn{1}{l|}{97.04}                                   & \multicolumn{1}{l|}{39.334}                                  & \multicolumn{1}{l|}{0.235}  & \multicolumn{1}{l|}{97.146} & \multicolumn{1}{l|}{47.214} & \multicolumn{1}{l|}{0}                                       & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{94.451}} & 26.545                                  \\ \midrule
\multicolumn{11}{|l|}{ADABoost}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.373}} & \multicolumn{1}{l|}{94.194}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.238}} & \multicolumn{1}{l|}{96.721} & \multicolumn{1}{l|}{94.517} & \multicolumn{1}{l|}{92.5}   & \multicolumn{1}{l|}{70}                                      & \multicolumn{1}{l|}{78.903}                                  & 86.555                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{84.399}                                  & \multicolumn{1}{l|}{89.81}                                   & \multicolumn{1}{l|}{90.665}                                  & \multicolumn{1}{l|}{80.756} & \multicolumn{1}{l|}{87.467} & \multicolumn{1}{l|}{86.23}  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{89.024}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{71.282}} & \cellcolor[HTML]{DBF2A5}\textbf{76.937} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{93.264}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.916}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.865}} & \multicolumn{1}{l|}{93.443} & \multicolumn{1}{l|}{93.668} & \multicolumn{1}{l|}{94}     & \multicolumn{1}{l|}{70}                                      & \multicolumn{1}{l|}{89.873}                                  & 94.958                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{66.481}                                  & \multicolumn{1}{l|}{92.149}                                  & \multicolumn{1}{l|}{83.862}                                  & \multicolumn{1}{l|}{67.077} & \multicolumn{1}{l|}{89.463} & \multicolumn{1}{l|}{81.516} & \multicolumn{1}{l|}{41.768}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{77.745}} & \cellcolor[HTML]{DBF2A5}\textbf{77.635} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{97.927}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.774}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{97.179}} & \multicolumn{1}{l|}{93.989} & \multicolumn{1}{l|}{93.473} & \multicolumn{1}{l|}{94.5}   & \multicolumn{1}{l|}{90}                                      & \multicolumn{1}{l|}{85.232}                                  & 74.79                                   \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{80.93}                                   & \multicolumn{1}{l|}{93.766}                                  & \multicolumn{1}{l|}{84.177}                                  & \multicolumn{1}{l|}{75.813} & \multicolumn{1}{l|}{88.733} & \multicolumn{1}{l|}{79.546} & \multicolumn{1}{l|}{69.207}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{78.285}} & 68.986                                  \\ \midrule
\multicolumn{11}{|l|}{SVM}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{98.446}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{98.548}} & \multicolumn{1}{l|}{95.298}                                  & \multicolumn{1}{l|}{98.907} & \multicolumn{1}{l|}{97.389} & \multicolumn{1}{l|}{94.5}   & \multicolumn{1}{l|}{90}                                      & \multicolumn{1}{l|}{97.468}                                  & 94.958                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{85.711}                                  & \multicolumn{1}{l|}{98.381}                                  & \multicolumn{1}{l|}{88.947}                                  & \multicolumn{1}{l|}{85.588} & \multicolumn{1}{l|}{97.342} & \multicolumn{1}{l|}{87.056} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{90.854}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{97.245}} & \cellcolor[HTML]{DBF2A5}\textbf{84.68}  \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{94.301}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.916}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.552}} & \multicolumn{1}{l|}{96.175} & \multicolumn{1}{l|}{96.042} & \multicolumn{1}{l|}{97}     & \multicolumn{1}{l|}{90}                                      & \multicolumn{1}{l|}{67.932}                                  & 72.269                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{73.196}                                  & \multicolumn{1}{l|}{91.68}                                   & \multicolumn{1}{l|}{83.494}                                  & \multicolumn{1}{l|}{75.204} & \multicolumn{1}{l|}{91.6}   & \multicolumn{1}{l|}{84.671} & \multicolumn{1}{l|}{58.232}                                  & \multicolumn{1}{l|}{57.366}                                  & 52.148                                  \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{97.927}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.613}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.552}} & \multicolumn{1}{l|}{97.814} & \multicolumn{1}{l|}{95.822} & \multicolumn{1}{l|}{96}     & \multicolumn{1}{l|}{100}                                     & \multicolumn{1}{l|}{65.823}                                  & 78.992                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{84.876}                                  & \multicolumn{1}{l|}{91.739}                                  & \multicolumn{1}{l|}{83.772}                                  & \multicolumn{1}{l|}{85.062} & \multicolumn{1}{l|}{91.816} & \multicolumn{1}{l|}{83.375} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{78.659}} & \multicolumn{1}{l|}{57.748}                                  & 69.67                                   \\ \midrule
\multicolumn{11}{|l|}{LSTM}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{99.085}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.483}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{97.353}} & \multicolumn{1}{l|}{98.808} & \multicolumn{1}{l|}{94.975} & \multicolumn{1}{l|}{98.889} & \multicolumn{1}{l|}{100}                                     & \multicolumn{1}{l|}{88.027}                                  & 88.422                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{82.047}                                  & \multicolumn{1}{l|}{89.562}                                  & \multicolumn{1}{l|}{91.959}                                  & \multicolumn{1}{l|}{82.056} & \multicolumn{1}{l|}{90.085} & \multicolumn{1}{l|}{89.832} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{90.909}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{79.261}} & \cellcolor[HTML]{DBF2A5}\textbf{82.53}  \\ \midrule
\multicolumn{11}{|l|}{CNN}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{83.753}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{96.537}} & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{97.19}}  & \multicolumn{1}{l|}{88.061} & \multicolumn{1}{l|}{92.264} & \multicolumn{1}{l|}{96.322} & \multicolumn{1}{l|}{63.636}                                  & \multicolumn{1}{l|}{91.826}                                  & 98.066                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Time}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{65.316}                                  & \multicolumn{1}{l|}{88.828}                                  & \multicolumn{1}{l|}{85.85}                                   & \multicolumn{1}{l|}{65.056} & \multicolumn{1}{l|}{83.73}  & \multicolumn{1}{l|}{87.789} & \multicolumn{1}{l|}{66.768}                                  & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{86.707}} & \cellcolor[HTML]{DBF2A5}\textbf{93.481} \\ \midrule
\multicolumn{11}{|l|}{*Multi-subject non-mixed setup accuracies are highlighted if value \textgreater 96\%.}                                \\ \midrule
\multicolumn{11}{|l|}{**LOSO mixed setup accuracies are highlighted if value \textgreater 70\%}                                              \\ \bottomrule
\end{tabular}
}
\end{table*}

\begin{table}
\caption{Relevant state of the art.}
\label{result:SOA}
\begin{tabular}{@{}|l|l|l|l|@{}}
\toprule
                                    & \textbf{Drug} & \textbf{Inhale} & \textbf{Exhale} \\ \midrule
\textbf{Holmes et al. (2012)}       & 89            & -               & -               \\ \midrule
\textbf{Holmes et al. (2013-14)}    & 92.1          & 91.7            & 93.7            \\ \midrule
\textbf{Taylor et al. (2017) / QDA} & 88.2          & -               & -               \\ \midrule
\textbf{Taylor et al. (2017) / ANN} & 65.6          & -               & -               \\ \bottomrule
\end{tabular}
\end{table}

\begin{table*}
\caption{Comparative performance of methods for drug inhalation recognition}
\label{table:results:drug_analysis}
\resizebox{\textwidth}{!}{
\begin{tabular}{@{}|lllllllllll|@{}}
\toprule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{}          & \multicolumn{3}{l|}{Multi subject $^{*}$}                                                                                & \multicolumn{3}{l|}{Single subject}                                                                 & \multicolumn{3}{l|}{LOSO $^{**}$}                                                                                \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{}          & \multicolumn{1}{l|}{Accuracy} & \multicolumn{1}{l|}{Specificity} & \multicolumn{1}{l|}{Sensitivity}                             & \multicolumn{1}{l|}{Accuracy} & \multicolumn{1}{l|}{Specificity} & \multicolumn{1}{l|}{Sensitivity} & \multicolumn{1}{l|}{Accuracy} & \multicolumn{1}{l|}{Specificity} & Sensitivity                             \\ \midrule
\multicolumn{11}{|l|}{Random Forests}              \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{99.023}   & \multicolumn{1}{l|}{99.721}      & \multicolumn{1}{l|}{94.03}                                   & \multicolumn{1}{l|}{98.473}   & \multicolumn{1}{l|}{99.782}      & \multicolumn{1}{l|}{92.347}      & \multicolumn{1}{l|}{98.473}   & \multicolumn{1}{l|}{99.414}      & 58.333                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.677}   & \multicolumn{1}{l|}{99.638}      & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{66.172}} & \multicolumn{1}{l|}{98.266}   & \multicolumn{1}{l|}{99.458}      & \multicolumn{1}{l|}{69.083}      & \multicolumn{1}{l|}{99.051}   & \multicolumn{1}{l|}{99.967}      & \cellcolor[HTML]{DBF2A5}\textbf{22.155} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.034}   & \multicolumn{1}{l|}{98.817}      & \multicolumn{1}{l|}{92.147}                                  & \multicolumn{1}{l|}{97.736}   & \multicolumn{1}{l|}{98.802}      & \multicolumn{1}{l|}{92.473}      & \multicolumn{1}{l|}{99.046}   & \multicolumn{1}{l|}{99.417}      & 77.778                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.39}    & \multicolumn{1}{l|}{99.139}      & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{64.74}}  & \multicolumn{1}{l|}{97.798}   & \multicolumn{1}{l|}{98.81}       & \multicolumn{1}{l|}{66.476}      & \multicolumn{1}{l|}{99.117}   & \multicolumn{1}{l|}{99.861}      & \cellcolor[HTML]{DBF2A5}\textbf{17.262} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.717}   & \multicolumn{1}{l|}{99.375}      & \multicolumn{1}{l|}{93.878}                                  & \multicolumn{1}{l|}{98.293}   & \multicolumn{1}{l|}{99.243}      & \multicolumn{1}{l|}{93.617}      & \multicolumn{1}{l|}{98.473}   & \multicolumn{1}{l|}{100}         & 55.556                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.844}   & \multicolumn{1}{l|}{99.515}      & \multicolumn{1}{l|}{51.383}                                  & \multicolumn{1}{l|}{97.38}    & \multicolumn{1}{l|}{99.284}      & \multicolumn{1}{l|}{56.831}      & \multicolumn{1}{l|}{97.831}   & \multicolumn{1}{l|}{99.927}      & 9.553                                   \\ \midrule
\multicolumn{11}{|l|}{GMM}                                                                           \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.656}   & \multicolumn{1}{l|}{99.375}      & \multicolumn{1}{l|}{93.401}                                  & \multicolumn{1}{l|}{98.383}   & \multicolumn{1}{l|}{99.244}      & \multicolumn{1}{l|}{94.118}      & \multicolumn{1}{l|}{98.282}   & \multicolumn{1}{l|}{98.839}      & 57.143                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.613}   & \multicolumn{1}{l|}{99.67}       & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{64.423}} & \multicolumn{1}{l|}{98.074}   & \multicolumn{1}{l|}{99.528}      & \multicolumn{1}{l|}{65.352}      & \multicolumn{1}{l|}{99.124}   & \multicolumn{1}{l|}{99.92}       & \cellcolor[HTML]{DBF2A5}\textbf{21.15}  \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.342}   & \multicolumn{1}{l|}{99.369}      & \multicolumn{1}{l|}{91.089}                                  & \multicolumn{1}{l|}{98.279}   & \multicolumn{1}{l|}{99.129}      & \multicolumn{1}{l|}{94.086}      & \multicolumn{1}{l|}{98.855}   & \multicolumn{1}{l|}{99.035}      & 83.333                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.148}   & \multicolumn{1}{l|}{99.374}      & \multicolumn{1}{l|}{56.92}                                   & \multicolumn{1}{l|}{97.749}   & \multicolumn{1}{l|}{99.066}      & \multicolumn{1}{l|}{63.326}      & \multicolumn{1}{l|}{99.281}   & \multicolumn{1}{l|}{99.831}      & \cellcolor[HTML]{DBF2A5}\textbf{18.494} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{88.882}   & \multicolumn{1}{l|}{88.807}      & \multicolumn{1}{l|}{100}                                     & \multicolumn{1}{l|}{84.097}   & \multicolumn{1}{l|}{84.893}      & \multicolumn{1}{l|}{58.824}      & \multicolumn{1}{l|}{97.519}   & \multicolumn{1}{l|}{98.081}      & 0                                       \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.6}     & \multicolumn{1}{l|}{97.983}      & \multicolumn{1}{l|}{38.465}                                  & \multicolumn{1}{l|}{96.775}   & \multicolumn{1}{l|}{96.775}      & \multicolumn{1}{l|}{100}         & \multicolumn{1}{l|}{99.159}   & \multicolumn{1}{l|}{99.705}      & 0                                       \\ \midrule
\multicolumn{11}{|l|}{ADABoost}                   \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.9}     & \multicolumn{1}{l|}{99.514}      & \multicolumn{1}{l|}{94.416}                                  & \multicolumn{1}{l|}{98.293}   & \multicolumn{1}{l|}{99.35}       & \multicolumn{1}{l|}{93.158}      & \multicolumn{1}{l|}{97.901}   & \multicolumn{1}{l|}{99.411}      & 46.667                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.723}   & \multicolumn{1}{l|}{99.639}      & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{67.24}}  & \multicolumn{1}{l|}{98.213}   & \multicolumn{1}{l|}{99.353}      & \multicolumn{1}{l|}{69.144}      & \multicolumn{1}{l|}{98.506}   & \multicolumn{1}{l|}{99.967}      & \cellcolor[HTML]{DBF2A5}\textbf{15.145} \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.342}   & \multicolumn{1}{l|}{99.093}      & \multicolumn{1}{l|}{92.784}                                  & \multicolumn{1}{l|}{97.645}   & \multicolumn{1}{l|}{98.694}      & \multicolumn{1}{l|}{92.432}      & \multicolumn{1}{l|}{98.473}   & \multicolumn{1}{l|}{99.414}      & 58.333                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.377}   & \multicolumn{1}{l|}{99.227}      & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{63.28}}  & \multicolumn{1}{l|}{97.483}   & \multicolumn{1}{l|}{98.896}      & \multicolumn{1}{l|}{59.881}      & \multicolumn{1}{l|}{98.852}   & \multicolumn{1}{l|}{99.827}      & 11.129                                  \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{99.145}   & \multicolumn{1}{l|}{99.722}      & \multicolumn{1}{l|}{94.975}                                  & \multicolumn{1}{l|}{98.293}   & \multicolumn{1}{l|}{98.821}      & \multicolumn{1}{l|}{95.556}      & \multicolumn{1}{l|}{94.847}   & \multicolumn{1}{l|}{99.796}      & 25.714                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.959}   & \multicolumn{1}{l|}{99.555}      & \multicolumn{1}{l|}{53.065}                                  & \multicolumn{1}{l|}{97.419}   & \multicolumn{1}{l|}{99.183}      & \multicolumn{1}{l|}{57.666}      & \multicolumn{1}{l|}{96.987}   & \multicolumn{1}{l|}{99.907}      & 6.489                                   \\ \midrule
\multicolumn{11}{|l|}{SVM}                        \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{99.084}   & \multicolumn{1}{l|}{99.791}      & \multicolumn{1}{l|}{94.059}                                  & \multicolumn{1}{l|}{98.922}   & \multicolumn{1}{l|}{99.783}      & \multicolumn{1}{l|}{94.764}      & \multicolumn{1}{l|}{99.237}   & \multicolumn{1}{l|}{99.805}      & 75                                      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.43}    & \multicolumn{1}{l|}{99.668}      & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{60.73}}  & \multicolumn{1}{l|}{98.008}   & \multicolumn{1}{l|}{99.513}      & \multicolumn{1}{l|}{64.443}      & \multicolumn{1}{l|}{98.452}   & \multicolumn{1}{l|}{99.973}      & 14.893                                  \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.526}   & \multicolumn{1}{l|}{99.232}      & \multicolumn{1}{l|}{93.333}                                  & \multicolumn{1}{l|}{98.46}    & \multicolumn{1}{l|}{99.237}      & \multicolumn{1}{l|}{94.624}      & \multicolumn{1}{l|}{95.42}    & \multicolumn{1}{l|}{99.797}      & 28.125                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Cepst}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.061}   & \multicolumn{1}{l|}{99.378}      & \multicolumn{1}{l|}{55.242}                                  & \multicolumn{1}{l|}{97.442}   & \multicolumn{1}{l|}{99.163}      & \multicolumn{1}{l|}{58.053}      & \multicolumn{1}{l|}{97.419}   & \multicolumn{1}{l|}{99.874}      & 6.49                                    \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{99.145}   & \multicolumn{1}{l|}{99.722}      & \multicolumn{1}{l|}{94.975}                                  & \multicolumn{1}{l|}{98.922}   & \multicolumn{1}{l|}{99.568}      & \multicolumn{1}{l|}{95.722}      & \multicolumn{1}{l|}{97.137}   & \multicolumn{1}{l|}{100}         & 40                                      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{MFCC}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.574}   & \multicolumn{1}{l|}{99.645}      & \multicolumn{1}{l|}{47.821}                                  & \multicolumn{1}{l|}{97.36}    & \multicolumn{1}{l|}{99.492}      & \multicolumn{1}{l|}{56.038}      & \multicolumn{1}{l|}{97.379}   & \multicolumn{1}{l|}{99.936}      & 8.264                                   \\ \midrule
\multicolumn{11}{|l|}{LSTM}                       \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{99.803}   & \multicolumn{1}{l|}{99.903}      & \multicolumn{1}{l|}{98.858}                                  & \multicolumn{1}{l|}{99.711}   & \multicolumn{1}{l|}{99.814}      & \multicolumn{1}{l|}{99.044}      & \multicolumn{1}{l|}{99.656}   & \multicolumn{1}{l|}{100}         & 77.941                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Spect}} & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.626}   & \multicolumn{1}{l|}{99.629}      & \multicolumn{1}{l|}{\cellcolor[HTML]{DBF2A5}\textbf{61.938}} & \multicolumn{1}{l|}{98.377}   & \multicolumn{1}{l|}{99.462}      & \multicolumn{1}{l|}{68.281}      & \multicolumn{1}{l|}{98.942}   & \multicolumn{1}{l|}{99.977}      & \cellcolor[HTML]{DBF2A5}\textbf{17.778} \\ \midrule
\multicolumn{11}{|l|}{CNN}                         \\ \midrule
\multicolumn{1}{|l|}{}                        & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{99.666}   & \multicolumn{1}{l|}{99.842}      & \multicolumn{1}{l|}{81.86}                                   & \multicolumn{1}{l|}{99.574}   & \multicolumn{1}{l|}{99.822}      & \multicolumn{1}{l|}{83.727}      & \multicolumn{1}{l|}{99.978}   & \multicolumn{1}{l|}{99.985}      & 77.778                                  \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{\multirow{-2}{*}{Time}}  & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.879}   & \multicolumn{1}{l|}{99.196}      & \multicolumn{1}{l|}{52.323}                                  & \multicolumn{1}{l|}{97.573}   & \multicolumn{1}{l|}{98.831}      & \multicolumn{1}{l|}{61.853}      & \multicolumn{1}{l|}{98.6}     & \multicolumn{1}{l|}{99.901}      & 13.059                                  \\ \midrule
\multicolumn{11}{|l|}{*Multi-subject non-mixed setup accuracies are highlighted if value \textgreater 60\%.}                                \\ \midrule
\multicolumn{11}{|l|}{**LOSO mixed setup accuracies are highlighted if value \textgreater 15\%}                                             \\ \bottomrule

\end{tabular}

}
\end{table*}

\begin{table*}
\caption{Exhalation Inhalation differentiation analysis.}
\label{table:results:exhale_inhale}
\resizebox{\textwidth}{!}{
\begin{tabular}{@{}|lllllllllll|@{}}
\toprule
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{}          & \multicolumn{3}{l|}{Multi subject}                                                                  & \multicolumn{3}{l|}{Single subject}                                                                 & \multicolumn{3}{l|}{LOSO}                                                      \\ \midrule
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{}          & \multicolumn{1}{l|}{Accuracy} & \multicolumn{1}{l|}{Specificity} & \multicolumn{1}{l|}{Sensitivity} & \multicolumn{1}{l|}{Accuracy} & \multicolumn{1}{l|}{Specificity} & \multicolumn{1}{l|}{Sensitivity} & \multicolumn{1}{l|}{Accuracy} & \multicolumn{1}{l|}{Specificity} & Sensitivity \\ \midrule
\multicolumn{11}{|l|}{Random   Forests}                                                                                \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Spect}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.646}   & \multicolumn{1}{l|}{98.377}      & \multicolumn{1}{l|}{98.789}      & \multicolumn{1}{l|}{98.543}   & \multicolumn{1}{l|}{98.413}      & \multicolumn{1}{l|}{98.611}      & \multicolumn{1}{l|}{99.01}    & \multicolumn{1}{l|}{99.091}      & 98.964      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.25}    & \multicolumn{1}{l|}{98.325}      & \multicolumn{1}{l|}{98.207}      & \multicolumn{1}{l|}{97.953}   & \multicolumn{1}{l|}{97.877}      & \multicolumn{1}{l|}{97.994}      & \multicolumn{1}{l|}{98.619}   & \multicolumn{1}{l|}{100}         & 97.775      \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Cepst}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.793}   & \multicolumn{1}{l|}{98.714}      & \multicolumn{1}{l|}{98.833}      & \multicolumn{1}{l|}{98.39}    & \multicolumn{1}{l|}{98.446}      & \multicolumn{1}{l|}{98.361}      & \multicolumn{1}{l|}{98.762}   & \multicolumn{1}{l|}{99.123}      & 98.565      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.511}   & \multicolumn{1}{l|}{98.827}      & \multicolumn{1}{l|}{96.869}      & \multicolumn{1}{l|}{97.586}   & \multicolumn{1}{l|}{98.323}      & \multicolumn{1}{l|}{97.214}      & \multicolumn{1}{l|}{97.613}   & \multicolumn{1}{l|}{99.699}      & 96.494      \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{MFCC}}  & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.794}   & \multicolumn{1}{l|}{98.718}      & \multicolumn{1}{l|}{98.833}      & \multicolumn{1}{l|}{98.579}   & \multicolumn{1}{l|}{98.462}      & \multicolumn{1}{l|}{98.641}      & \multicolumn{1}{l|}{99.029}   & \multicolumn{1}{l|}{99.091}      & 98.995      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.656}   & \multicolumn{1}{l|}{98.729}      & \multicolumn{1}{l|}{97.146}      & \multicolumn{1}{l|}{97.515}   & \multicolumn{1}{l|}{98.214}      & \multicolumn{1}{l|}{97.183}      & \multicolumn{1}{l|}{98.436}   & \multicolumn{1}{l|}{100}         & 97.614      \\ \midrule
\multicolumn{11}{|l|}{GMM}                                                                                \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Spect}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.339}   & \multicolumn{1}{l|}{96.825}      & \multicolumn{1}{l|}{99.242}      & \multicolumn{1}{l|}{94.963}   & \multicolumn{1}{l|}{89.623}      & \multicolumn{1}{l|}{98.457}      & \multicolumn{1}{l|}{98.997}   & \multicolumn{1}{l|}{97.391}      & 100         \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.342}   & \multicolumn{1}{l|}{95.658}      & \multicolumn{1}{l|}{98.529}      & \multicolumn{1}{l|}{96.223}   & \multicolumn{1}{l|}{93.019}      & \multicolumn{1}{l|}{98.393}      & \multicolumn{1}{l|}{98.59}    & \multicolumn{1}{l|}{98.365}      & 98.76       \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Cepst}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.786}   & \multicolumn{1}{l|}{98.71}       & \multicolumn{1}{l|}{98.826}      & \multicolumn{1}{l|}{98.574}   & \multicolumn{1}{l|}{98.462}      & \multicolumn{1}{l|}{98.634}      & \multicolumn{1}{l|}{98.868}   & \multicolumn{1}{l|}{98.63}       & 98.958      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.384}   & \multicolumn{1}{l|}{98.764}      & \multicolumn{1}{l|}{96.765}      & \multicolumn{1}{l|}{96.379}   & \multicolumn{1}{l|}{98.545}      & \multicolumn{1}{l|}{95.383}      & \multicolumn{1}{l|}{98.053}   & \multicolumn{1}{l|}{100}         & 97.533      \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{MFCC}}  & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{89.011}   & \multicolumn{1}{l|}{98.98}       & \multicolumn{1}{l|}{86.275}      & \multicolumn{1}{l|}{94.627}   & \multicolumn{1}{l|}{98.837}      & \multicolumn{1}{l|}{92.84}       & \multicolumn{1}{l|}{76.879}   & \multicolumn{1}{l|}{97.436}      & 74.267      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{84.178}   & \multicolumn{1}{l|}{98.758}      & \multicolumn{1}{l|}{81.513}      & \multicolumn{1}{l|}{81.274}   & \multicolumn{1}{l|}{97.849}      & \multicolumn{1}{l|}{77.781}      & \multicolumn{1}{l|}{75.19}    & \multicolumn{1}{l|}{100}         & 72.425      \\ \midrule
\multicolumn{11}{|l|}{Adaboost}                                                                                \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Spect}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.671}   & \multicolumn{1}{l|}{98.397}      & \multicolumn{1}{l|}{98.816}      & \multicolumn{1}{l|}{98.029}   & \multicolumn{1}{l|}{97.884}      & \multicolumn{1}{l|}{98.103}      & \multicolumn{1}{l|}{98.976}   & \multicolumn{1}{l|}{99.038}      & 98.942      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.266}   & \multicolumn{1}{l|}{98.329}      & \multicolumn{1}{l|}{98.231}      & \multicolumn{1}{l|}{97.336}   & \multicolumn{1}{l|}{97.527}      & \multicolumn{1}{l|}{97.233}      & \multicolumn{1}{l|}{98.343}   & \multicolumn{1}{l|}{100}         & 97.389      \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Cepst}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.8}     & \multicolumn{1}{l|}{98.722}      & \multicolumn{1}{l|}{98.841}      & \multicolumn{1}{l|}{97.838}   & \multicolumn{1}{l|}{97.409}      & \multicolumn{1}{l|}{98.066}      & \multicolumn{1}{l|}{99.088}   & \multicolumn{1}{l|}{99.123}      & 99.07       \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.506}   & \multicolumn{1}{l|}{98.716}      & \multicolumn{1}{l|}{96.915}      & \multicolumn{1}{l|}{97.03}    & \multicolumn{1}{l|}{97.474}      & \multicolumn{1}{l|}{96.811}      & \multicolumn{1}{l|}{98.047}   & \multicolumn{1}{l|}{100}         & 97.01       \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{MFCC}}  & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.806}   & \multicolumn{1}{l|}{98.726}      & \multicolumn{1}{l|}{98.847}      & \multicolumn{1}{l|}{98.205}   & \multicolumn{1}{l|}{98.438}      & \multicolumn{1}{l|}{98.082}      & \multicolumn{1}{l|}{98.98}    & \multicolumn{1}{l|}{98.889}      & 99.02       \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.826}   & \multicolumn{1}{l|}{98.672}      & \multicolumn{1}{l|}{97.417}      & \multicolumn{1}{l|}{96.094}   & \multicolumn{1}{l|}{96.475}      & \multicolumn{1}{l|}{95.909}      & \multicolumn{1}{l|}{98.373}   & \multicolumn{1}{l|}{100}         & 97.607      \\ \midrule
\multicolumn{11}{|l|}{SVM}                                                                                \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Spect}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.706}   & \multicolumn{1}{l|}{98.382}      & \multicolumn{1}{l|}{98.867}      & \multicolumn{1}{l|}{98.424}   & \multicolumn{1}{l|}{97.927}      & \multicolumn{1}{l|}{98.677}      & \multicolumn{1}{l|}{98.851}   & \multicolumn{1}{l|}{98.261}      & 99.142      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.738}   & \multicolumn{1}{l|}{97.881}      & \multicolumn{1}{l|}{97.667}      & \multicolumn{1}{l|}{97.41}    & \multicolumn{1}{l|}{96.789}      & \multicolumn{1}{l|}{97.716}      & \multicolumn{1}{l|}{97.92}    & \multicolumn{1}{l|}{98.824}      & 97.495      \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Cepst}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.799}   & \multicolumn{1}{l|}{98.718}      & \multicolumn{1}{l|}{98.841}      & \multicolumn{1}{l|}{98.587}   & \multicolumn{1}{l|}{98.477}      & \multicolumn{1}{l|}{98.645}      & \multicolumn{1}{l|}{98.406}   & \multicolumn{1}{l|}{98.851}      & 98.171      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.054}   & \multicolumn{1}{l|}{99.043}      & \multicolumn{1}{l|}{97.569}      & \multicolumn{1}{l|}{97.801}   & \multicolumn{1}{l|}{98.519}      & \multicolumn{1}{l|}{97.443}      & \multicolumn{1}{l|}{96.333}   & \multicolumn{1}{l|}{100}         & 94.605      \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{MFCC}}  & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.909}   & \multicolumn{1}{l|}{98.718}      & \multicolumn{1}{l|}{99.008}      & \multicolumn{1}{l|}{98.589}   & \multicolumn{1}{l|}{98.462}      & \multicolumn{1}{l|}{98.656}      & \multicolumn{1}{l|}{98.814}   & \multicolumn{1}{l|}{98.947}      & 98.734      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.094}   & \multicolumn{1}{l|}{98.797}      & \multicolumn{1}{l|}{97.747}      & \multicolumn{1}{l|}{97.992}   & \multicolumn{1}{l|}{98.523}      & \multicolumn{1}{l|}{97.731}      & \multicolumn{1}{l|}{97.348}   & \multicolumn{1}{l|}{100}         & 95.671      \\ \midrule
\multicolumn{11}{|l|}{LSTM}                                                                                \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Spect}} & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.783}   & \multicolumn{1}{l|}{98.868}      & \multicolumn{1}{l|}{98.738}      & \multicolumn{1}{l|}{99.11}    & \multicolumn{1}{l|}{98.451}      & \multicolumn{1}{l|}{99.477}      & \multicolumn{1}{l|}{97.061}   & \multicolumn{1}{l|}{98.955}      & 96.124      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{98.182}   & \multicolumn{1}{l|}{98.364}      & \multicolumn{1}{l|}{98.082}      & \multicolumn{1}{l|}{97.794}   & \multicolumn{1}{l|}{98.291}      & \multicolumn{1}{l|}{97.53}       & \multicolumn{1}{l|}{96.057}   & \multicolumn{1}{l|}{99.769}      & 94.07       \\ \midrule
\multicolumn{11}{|l|}{CNN}                                                                                \\ \midrule
\multicolumn{1}{|l|}{\multirow{2}{*}{Time}}  & \multicolumn{1}{l|}{Non-mixed} & \multicolumn{1}{l|}{98.121}   & \multicolumn{1}{l|}{97.39}       & \multicolumn{1}{l|}{98.528}      & \multicolumn{1}{l|}{97.69}    & \multicolumn{1}{l|}{97.06}       & \multicolumn{1}{l|}{98.046}      & \multicolumn{1}{l|}{99.055}   & \multicolumn{1}{l|}{99.228}      & 98.951      \\ \cmidrule(l){2-11}
\multicolumn{1}{|l|}{}                       & \multicolumn{1}{l|}{Mixed}     & \multicolumn{1}{l|}{97.553}   & \multicolumn{1}{l|}{98.133}      & \multicolumn{1}{l|}{97.249}      & \multicolumn{1}{l|}{96.897}   & \multicolumn{1}{l|}{96.776}      & \multicolumn{1}{l|}{96.966}      & \multicolumn{1}{l|}{99.296}   & \multicolumn{1}{l|}{100}         & 98.885      \\ \bottomrule
\end{tabular}
}
\end{table*}

\section{Discussion and Future Considerations}
\label{section:future}

The pressurized metered dose inhaler (pMDI) is the most commonly used inhaler, with total worldwide sales of pMDI products reaching over \$2 billion per year \cite{horne2005concordance}. Studies have reported that over 50\% of patients are prone to not adhering to the correct inhaler technique \cite{bender1997nonadherence}. It has been stated that acoustics can be employed to detect and recognize dry powder inhaler sounds \cite{murphy2012relationship}. Almost 4 decades ago, the earliest investigations into poor inhaler sufficiency in patients using pMDIs, indicated that poor technique was likely to be associated with less than the highest quality of response to the therapy \cite{oprehek1976patient, paterson1976use}. Several studies have since intimated a strong connection between poor inhaler adequacy and patient outcomes, on a larger scale \cite{e2001determinants}, including higher rates of hospital access and emergency room attendance \cite{melani17}. By providing suitable feedback to medical staff and guiding patients to improve their inhaler usage technique, could facilitate efficient self-management of obstructive respiratory diseases, allowing patients to avoid dangerous exacerbation events \cite{wu2015max}. Asthma is almost in the center of the wave of digital health developments, as it requires systematic attention of both health care specialist doctors and patients \cite{dhanani2016fundamentals}. Employing acoustic signal processing methods, the aforementioned algorithms were developed to accurately identify drug actuations, from pMDI's. As science and technology evolve and modern sensing components are becoming more available, a continual improvement process of inhalers, with an extended range of monitoring capabilities, holds the promise to further optimize asthma self-management. These methods provide an opportunity to enhance clinical education, by providing informative feedback to patients, which may contribute to improving respiratory health. Future work will consist of identifying pMDI inhalations to monitor actuation coordination technique and provide patient feedback, regarding drug delivery using acoustic methods. The accurate estimation of the parameters would be of significant clinical benefit to both patients and healthcare professionals, by enhancing precision medicine for chronic respiratory diseases. Ultimately, this work aims to prevent common mistakes, leading to potential upcoming dangerous events, such as exacerbation and hospitalization.

\section{Conclusions}
\label{section:conclusions}

Asthma forms an important socioeconomic burden, both in terms of medication costs and disability adjusted life years. The accurate and timely assessment of the state of asthma is the fundamental basis of digital health approaches and, also, is the most significant factor towards the preventive and efficient management of the disease. The necessity of inhaled medication offers a basic platform, upon which, modern technologies can be integrated, namely the inhaler device system itself. The control of asthma is a complex and multiparametric issue, that is greatly affected not only by physiological and environmental parameters, but, also, the psychological state of patients and their cultural and socioeconomic background. Indicative of the complexity of the asthma disease is the diversity of its prevalence around the world. All the above outline the need to increase the active involvement of patients in modern treatment methodologies and to use modern technologies, so as to create easy-to-use tools for safe and effective self-management. A fundamental step in this direction is the creation of a sensing framework, that could provide accurate information, about the health of patients and help their doctors understand any possible difficulty, that prevents patients from using their inhaled medication correctly. This need for the modernization of inhaler devices has stimulated the research and commercial interest for their enhancement with novel sensing capabilities and has led to a number of approaches, that focus mainly on the detection of inhaler actuations. The modern adherence monitoring environment has also been analyzed in other studies, addressing important related issues, such as the interpretation of results and the design of interventions that promote adherence.

\appendices

\section{Machine learning algorithms}

\subsection{Support vector machines}
\label{appendix:SVM}
For a decision hyper-plane ${\bf x}^T {\bf w}+b=0$ to separate the two classes $P=\{({\bf x}_i,1)\}$ and $N=\{({\bf x}_i,-1)\}$, it has to satisfy
\[
y_i ({\bf x}_i^T{\bf w}+b) \ge 0
\]
for both ${\bf x}_i \in P$ and ${\bf x}_i \in N$. Among all such planes satisfying this condition, we want to find the optimal one $H_0$ that separates the two classes with the maximal margin (the distance between the decision plane and the closest sample points). The optimal plane should be in the middle of the two classes, so that the distance from the plane to the closest point on either side is the same. We define two additional planes $H_+$ and $H_-$ that are parallel to $H_0$ and go through the point closest to the plane on either side:
\[
  {\bf x}^T {\bf w}+b=1,\;\;\;\;\mbox{and}\;\;\;\;{\bf x}^T {\bf w}+b=-1
\]
All points ${\bf x}_i \in P$ on the positive side should satisfy
\[
  {\bf x}_i^T {\bf w}+b \ge 1,\;\;\;\;y_i=1
\]
and all points ${\bf x}_i \in N$ on the negative side should satisfy
\[
  {\bf x}_i^T {\bf w}+b \le -1,\;\;\;\; y_i=-1
\]
These can be combined into one inequality:
\[
y_i ({\bf x}_i^T{\bf w} +b) \ge 1,\;\;\;(i=1,\cdots,m)
\]
The equality holds for those points on the planes $H_+$ or $H_-$. Such points are called {\em support vectors}, for which
\[
  {\bf x}_i^T {\bf w}+b = y_i
\]
i.e., the following holds for all support vectors:
\[
b=y_i-{\bf x}_i^T {\bf w}=y_i-\sum_{j=1}^m  \alpha_j y_j ({\bf x}_i^T {\bf x}_j)
\]
Moreover, the distances from the origin to the three parallel planes $H_-$, $H_0$ and $H_+$ are, respectively, $|b-1|/||{\bf w}||$, $|b|/||{\bf w}||$,
and $|b+1|/||{\bf w}||$, and the distance between planes $H_-$ and $H_+$ is $2/||{\bf w}||$. Our goal is to maximize this distance, or equivalently, to minimize the norm $||{\bf w}||$. Now the problem of finding the optimal decision plane in terms of ${\bf w}$ and $b$ can be formulated as:
\begin{eqnarray}
  &	\mbox{minimize} & \frac{1}{2}{\bf w}^T {\bf w}=\frac{1}{2}||{\bf w}||^2
  \;\;\;\;\;\;\mbox{(objective function)}	\nonumber \\
  &	\mbox{subject to} & y_i ({\bf x}_i^T {\bf w}+b) \ge 1,\;\;\mbox{or}\;\;
  1-y_i ({\bf x}_i^T {\bf w}+b) \le 0,
  \nonumber
\end{eqnarray}
$(\mathrm{i}=1, \cdots, m)$. Since the objective function is quadratic, this constrained optimization problem is called a quadratic program (QP) problem. (If the objective function is linear instead, the problem is a linear program (LP) problem). This QP problem can be solved by Lagrange multipliers method to minimize the following
\[
L_p({\bf w},b,{\bf \alpha})=\frac{1}{2}||{\bf w}||^2
+\sum_{i=1}^m \alpha_i(1-y_i({\bf x}_i^T{\bf w}+b))
\]
with respect to ${\bf w}$, $b$ and the Lagrange coefficients $\alpha_i\ge 0$
$(i=1,\cdots,\alpha_m)$.  We let
\[ 	\frac{\partial}{\partial W}L_p({\bf w},b)=0,\;\;\;
	\frac{\partial}{\partial b}L_p({\bf w},b)=0	\]
These lead, respectively, to
\[	{\bf w}=\sum_{j=1}^m \alpha_j y_j {\bf x}_j,\;\;\;\mbox{and}\;\;\;\;
	\sum_{i=1}^m \alpha_i y_i=0	\]
Substituting these two equations back into the expression of $L({\bf w},b)$,
we get the {\em dual problem} (with respect to $\alpha_i$) of the above
{\em primal problem}:
\begin{eqnarray}
& 	\mbox{maximize} & L_d({\bf \alpha})=
	\sum_{i=1}^m\alpha_i -\frac{1}{2}
	\sum_{i=1}^m \sum_{j=1}^m \alpha_i \alpha_j y_i y_j {\bf x}_i^T,{\bf x}_j
	\nonumber \\
&	\mbox{subject to} & \alpha_i\ge 0,\;\;\;\;
	\sum_{i=1}^m \alpha_i y_i=0	\nonumber
\end{eqnarray}
The dual problem is related to the primal problem by:
\[	L_d({\bf \alpha})=inf_{({\bf w},b)} L_p({\bf w},b,{\bf \alpha})	\]

i.e., $L_d$ is the greatest lower bound (infimum) of $L_p$ for all ${\bf w}$ and $b$. Solving this dual problem (an easier problem than the primal one), we get $\alpha_i$, from which ${\bf w}$ of the optimal plane can be found. Those points ${\bf x}_i$ on either of the two planes $H_+$ and $H_-$ (for which the equality $y_i({\bf w}^T {\bf x}_i+b)=1$ holds) are called {\em support vectors} and they correspond to positive Lagrange multipliers $\alpha_i>0$. The training depends only on the support vectors, while all other samples away from the planes $H_+$ and $H_-$ are not important. For a support vector ${\bf x}_i$ (on the $H_-$ or $H_+$ plane), the constraining condition is
\[	y_i \left({\bf x}_i^T {\bf w}+b\right) = 1\;\;\;\;(i \in sv)	\]
here $sv$ is a set of all indices of support vectors ${\bf x}_i$ (corresponding to $\alpha_i > 0$). Substituting
\[	{\bf w}=\sum_{j=1}^m \alpha_j y_j {\bf x}_j=\sum_{j\in sv} \alpha_j y_j {\bf x}_j \]
we get
\[	y_i(\sum_{j\in sv} \alpha_j y_j {\bf x}^T_i {\bf x}_j+b) = 1	\]
Note that the summation only contains terms corresponding to those support vectors ${\bf x}_j$ with $\alpha_j>0$, i.e.
\[	y_i \sum_{j\in sv} \alpha_j y_j {\bf x}^T_i {\bf x}_j= 1-y_i b	\]
For the optimal weight vector ${\bf w}$ and optimal $b$, we have:
\begin{eqnarray}
||{\bf w}||^2&=&{\bf w}^T {\bf w} = \sum_{i\in sv} \alpha_i y_i {\bf x}^T_i
	\sum_{j\in sv} \alpha_j y_j {\bf x}_j	\nonumber \\
&=&	\sum_{i\in sv} \alpha_i (1-y_i b)
	=\sum_{i\in sv} \alpha_i - b\sum_{i\in sv} \alpha_i y_i	\nonumber \\
&=&	\sum_{i\in sv} \alpha_i \nonumber
\end{eqnarray}
The last equality is due to $\sum_{i=1}^m \alpha_i y_i=0$ shown above. Recall that the distance between the two margin planes $H_+$ and $H_-$ is $2/||{\bf w}||$, and the margin, the distance between $H_+$ (or $H_-$) and the optimal decision plane $H_0$, is
\[	\frac{1}{||{\bf w}||}=\left(\sum_{i\in sv} \alpha_i\right)^{-1/2}	\]

\subsection{Adaboost}
\label{appendix:Adaboost}

Let's assume $N$ samples $x_{i} \in \mathrm{X}$, $i=\{1,...,N\}$ with corresponding labels $y_{i} \in Y=\{-1,+1\}$ are given and used as a training set
$\left(x_{1}, y_{1}\right),\left(x_{2}, y_{2}\right), \ldots \ldots\left(x_{n}, y_{N}\right)$.

Initially set up a weight $\mathrm{D}(\mathrm{i})$ and make $\mathrm{D}(\mathrm{i})=1 / \mathrm{N}$ and then iterate for $\mathrm{t}=1,2, \ldots, \mathrm{T}$, where $\mathrm{T}$ is a parameter representing the maximum circulation times of training. For T-training, firstly, the weight distributing on the sample $\left\{X_{i}, \quad Y_{i}\right\}$ is recorded as $\mathrm{D}_{\mathrm{t}}(\mathrm{i})$ while the T-th iteration happens and as per the distribution $\mathrm{D}_{\mathrm{t}}$ the weak learner finds its weak hypothesis $\mathrm{h}_{\mathrm{t}}: \mathrm{X} \rightarrow\{+1,-1\}$ and adjusts distribution. Secondly, the error rate in computing $\mathrm{h}_{\mathrm{t}}$: $\varepsilon_{t}=\sum_{i=1}^{N} D_{t}\left(x_{i}\right)\left[h_{t}\left(x_{i}\right) \neq y_{i}\right]$. Thirdly, compute the weight of weak classifier based on the error rate: $\alpha_{t}=(1 / 2) \ln \left(\left(1-\varepsilon_{v}\right) / \varepsilon_{t}\right)$. Fourthly, update the sample weight: $D_{t+1}\left(x_{i}\right)=\frac{D_{t}\left(x_{i}\right)}{Z_{t}} \exp \left(-\alpha_{t} y_{i} h_{t}\left(x_{i}\right)\right)$ among which,
$Z_{t}=\sum_{i=1}^{n} D_{t}\left(x_{i}\right) \exp \left(-\alpha_{t} y_{i} h_{t}\left(x_{i}\right)\right.$ $Z_{t}$ is a standardized factor that meets the probability distribution. T-weak classifiers are gained after T times of circulation, and a strong classifier
$H(x)=\operatorname{sign}\left(\sum_{t=1}^{T} \alpha_{t} h_{t}(x)\right)$ is gained after adding to the updated weight \cite{nousias2016monitoring}.

\subsection{GMM}
\label{appendix:GMM}

In the GMM classifier, the Gaussian mixture density of each  d-dimensional feature vector $v$ is modeled as a linear combination of multivariate Gaussian PDFs with the general form:

\begin{equation}
    p\left(v | \theta_i\right) = \frac{1}{\left(2\pi\right)^\frac{d}{2} |C_i|^2}e^{\left[ -\frac{1}{2}\left(v - \mu_i\right)^T{C_i}^{-1}\left(v-\mu_i\right)\right]}
\end{equation}

\noindent where $\theta_i = \left(\mu_i,C_i\right)$ are the parameters of component $i$, including the mean feature vector $\mu_i$ and the $d \times d$ covariance matrix $C_i$, and $|C_i|$ is the determinant of $C_i$. The complete set of parameters for a mixture model with $K$ components is $\Theta=\{\alpha_1,...,\alpha_K,\theta_1,...,\theta_K\}$ Each GMM model $\lambda_n$ for class $n$ is parameterized as follows:

\begin{equation}
    \lambda_n = \{{a_k}^n,{\mu_k}^n,{C_k}^n\}
\end{equation}

\noindent where $k=1,...,K$. It is important to note that each multivariate Gaussian pdf is completely defined if we know $\theta$.\par

At this point we analyze the expectation-maximization (EM) algorithm employed to compute the GMM parameters. The membership weight of data point v in component k given parameter 2 is defined as:

\begin{equation}
    w_{ik } = \frac{p_k\left(v_i, \theta_k\right)a_k}{\sum_{m=1}^{K}p_m\left(v_i|\theta_m\right)a_m}
\end{equation}

for all components $k$, $1 \leq k \leq K$ and all data samples $i$, $1 \leq i \leq N$. In each iteration of the EM algorithm for Gaussian Mixtures we deploy an E-step and an M-step. At E-Step we compute $w_{ik}$ for all feature vectors $v_i$ and all mixture components $k$. At M-Step we calculate the new parameters. Given $N_k = \sum_{i=1}^{N}w_{ik}$ the sum of membership weights for the $k$ -th component we get the mixture weights:

\begin{equation}
    {a_k}^{new} = \frac{N_k}{N}, \quad\quad 1 \leq k \leq K
\end{equation}

The updated mean:

\begin{equation}
{\mu_k}^{new} = \frac{1}{N_k}\sum_{i=1}^{N}w_{ik}v_i, \quad \quad 1 \leq k \leq K
\end{equation}

and the updated covariance:

\begin{equation}
    {C_k}^{new} = \frac{1}{N_k}\sum_{i=1}^{N}w_{ik}\left(v-\mu_i\right)^T\left(v-\mu_i\right)
\end{equation}

The termination criteria for the EM is the following:

\begin{equation}
    \log {l\left(\Theta\right)_{t+1}} - \log {l\left(\Theta\right)_t \leq \epsilon}
\end{equation}

\noindent where the log-likelihood, defined as $\log {l\left(\Theta\right)} = \sum_{i=1}^{N}\log {p\left(v_i|\Theta\right)}$ and $\epsilon$ is a small user-defined scalar value. In order to find the best fit for the data, we compute the GMM for 1 to $d=40$ components iterating over full and diagonal covariance matrices, where $d$ is the size of each feature vector $v$. With the generation of each model we estimate the Bayesian Information Criteria (BIC). The model with the lowest BIC best fits the input data.\par

\section{Feature extraction}

\subsection{CWT}
\label{appendix:CWT}

In theory, it is assumed that continuous signal $x(t)$ can be approximated perfectly by $a_{n}$ and $\psi_{n}$, but in reality this is often not true. Let us consider a real signal $x(t)$ and its approximation $\hat{x}(t)$, which can be perfectly approximated by $a_{n}$ and $\psi_{n}$. The approximation error is defined as the difference between $x(t)$ and $\hat{x}(t)$. This results in an error function, which is used as a measure for the overall error. Therefore the sum of the remaining squared inner products is calculated (2-norm) and is used as a measure for the error $(\epsilon)$.

\begin{equation}
\epsilon[M]=\|x(t)-\hat{x}(t)\|^{2}=\sum_{n=M}^{+\infty}\left|\left\langle x(t), \psi_{n}(t)\right\rangle\right|^{2}
\end{equation}
with
\begin{equation}
\hat{x}(t)=\sum_{n=0}^{M-1}\left\langle x(t), \psi_{n}(t)\right\rangle \psi_{n}
\end{equation}

If the number of terms $M$ is increased the error becomes smaller i.e. when $M$ goes to $+\infty$ then the approximation error goes to zero. The rate that determines how fast $\epsilon[M]$ goes to zero with increasing $M$ is called the decay rate and says something about how well a certain frame can approximate a signal. To be ``admissible'' as a wavelet, this function must have zero mean and be localized in both time and frequency space (Farge 1992) \cite{farge1992wavelet}.

The Continuous Wavelet Transformation (CWT) was introduced almost 3 decades ago, in order to overcome the limited time-frequency localization of the FFT \cite{kron} for non-stationary signals and was found to be suitable in multiple applications \cite{kron, parad}. It is similar to the human ear which exhibits similar time-frequency resolution characteristics \cite{tzan, das2}. While the Fourier Transform decomposes a signal into infinite length sines and cosines, effectively losing all time-localization information, the CWT's basis functions are scaled and shifted versions of the time-localized mother wavelet.
The CWT of $x(t)$ at any scale $s$ and position $u$ is the projection of $x$ on the corresponding wavelet atom $\psi$, as described in the following formula:

\begin{equation}
W_{\psi}^{x}(u, s)=\left\langle x, \psi_{u, s}\right\rangle=\int_{-\infty}^{+\infty} x(t) \frac{1}{\sqrt{s}} \psi^{*}\left(\frac{t-u}{s}\right) d t
\end{equation}

It represents one-dimensional signals by highly redundant time-scale images in $(u, s)$. The CWT is an excellent tool for mapping the changing properties of non-stationary signals.
The CWT consists of $N$ spectral values for each scale used, each of these requiring an IFFT. The computational load of the CWT and its memory requirements are thus considerable. The benefit from this high measure of redundancy in the CWT is an accurate time-frequency spectrum. Unlike a Fourier decomposition which always uses complex exponential (sine and cosine) basis functions, a wavelet decomposition uses a time-localized oscillatory function as the analyzing or mother wavelet. The mother wavelet is a function that is continuous in both time and frequency and serves as the source function from which scaled and translated basis functions are constructed. The mother wavelet can be complex or real and it, generally, includes an adjustable parameter which controls the properties of the localized oscillation.

\section{Tables}

Tables \ref{table:results:svm} to \ref{table:results:cnn:raw} present in detail the classification outcomes for all methods, evaluation setups and classes. The aforementioned tables were used to derive tables in the results section

\begin{table*}
\caption{Experimental evaluation with SVM algorithm\\ Normalized confusion matrices.}
\label{table:results:svm}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                               & \multicolumn{4}{l|}{Single subject}                                                              & \multicolumn{4}{l|}{LOSO}                                                                        \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{98.446} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.554}  & 0      & \multicolumn{1}{l|}{98.907} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.093}  & 0      & \multicolumn{1}{l|}{90}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{10}     & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{98.548} & \multicolumn{1}{l|}{0.806}  & 0.645  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{97.389} & \multicolumn{1}{l|}{1.044}  & 1.567  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{97.468} & \multicolumn{1}{l|}{0.844}  & 1.688  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2.508}  & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{95.298} & 0      & \multicolumn{1}{l|}{3}      & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{94.5}   & 0      & \multicolumn{1}{l|}{2.521}  & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{94.958} & 0.84   \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.792}  & \multicolumn{1}{l|}{72.277} & \multicolumn{1}{l|}{1.584}  & 25.347 & \multicolumn{1}{l|}{1.153}  & \multicolumn{1}{l|}{63.977} & \multicolumn{1}{l|}{1.729}  & 33.141 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{90.506} & \multicolumn{1}{l|}{1.266}  & 8.228  \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{85.711} & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{1.205}  & 11.085 & \multicolumn{1}{l|}{85.588} & \multicolumn{1}{l|}{2.007}  & \multicolumn{1}{l|}{1.232}  & 11.173 & \multicolumn{1}{l|}{90.854} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 9.146  \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.04}   & \multicolumn{1}{l|}{98.381} & \multicolumn{1}{l|}{1.052}  & 0.527  & \multicolumn{1}{l|}{0.045}  & \multicolumn{1}{l|}{97.342} & \multicolumn{1}{l|}{1.575}  & 1.037  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{97.245} & \multicolumn{1}{l|}{0.552}  & 2.203  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{4.565}  & \multicolumn{1}{l|}{4.301}  & \multicolumn{1}{l|}{88.947} & 2.187  & \multicolumn{1}{l|}{5.577}  & \multicolumn{1}{l|}{4.17}   & \multicolumn{1}{l|}{87.056} & 3.197  & \multicolumn{1}{l|}{7.656}  & \multicolumn{1}{l|}{4.562}  & \multicolumn{1}{l|}{84.68}  & 3.101  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.116}  & \multicolumn{1}{l|}{92.929} & \multicolumn{1}{l|}{0.745}  & 5.21   & \multicolumn{1}{l|}{1.411}  & \multicolumn{1}{l|}{90.771} & \multicolumn{1}{l|}{0.547}  & 7.271  & \multicolumn{1}{l|}{0.884}  & \multicolumn{1}{l|}{96.621} & \multicolumn{1}{l|}{0.675}  & 1.821  \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{94.301} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3.109}  & 2.591  & \multicolumn{1}{l|}{96.175} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.639}  & 2.186  & \multicolumn{1}{l|}{90}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{10}     & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{96.916} & \multicolumn{1}{l|}{0.649}  & 2.435  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{96.042} & \multicolumn{1}{l|}{0.792}  & 3.166  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{67.932} & \multicolumn{1}{l|}{0.422}  & 31.646 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{0.94}   & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{96.552} & 0.313  & \multicolumn{1}{l|}{0.5}    & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{97}     & 0      & \multicolumn{1}{l|}{19.328} & \multicolumn{1}{l|}{2.521}  & \multicolumn{1}{l|}{72.269} & 5.882  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{4}      & \multicolumn{1}{l|}{1}      & 93     & \multicolumn{1}{l|}{2.632}  & \multicolumn{1}{l|}{4.971}  & \multicolumn{1}{l|}{1.17}   & 91.228 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.633}  & \multicolumn{1}{l|}{0.633}  & 98.734 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{73.196} & \multicolumn{1}{l|}{0.225}  & \multicolumn{1}{l|}{1.47}   & 25.109 & \multicolumn{1}{l|}{75.204} & \multicolumn{1}{l|}{0.194}  & \multicolumn{1}{l|}{1.481}  & 23.121 & \multicolumn{1}{l|}{58.232} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.61}   & 41.159 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.17}   & \multicolumn{1}{l|}{91.68}  & \multicolumn{1}{l|}{0.441}  & 7.708  & \multicolumn{1}{l|}{0.284}  & \multicolumn{1}{l|}{91.6}   & \multicolumn{1}{l|}{0.695}  & 7.421  & \multicolumn{1}{l|}{0.039}  & \multicolumn{1}{l|}{57.366} & \multicolumn{1}{l|}{0}      & 42.595 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{5.701}  & \multicolumn{1}{l|}{4.18}   & \multicolumn{1}{l|}{83.494} & 6.625  & \multicolumn{1}{l|}{7.053}  & \multicolumn{1}{l|}{4.405}  & \multicolumn{1}{l|}{84.671} & 3.87   & \multicolumn{1}{l|}{17.378} & \multicolumn{1}{l|}{5.973}  & \multicolumn{1}{l|}{52.148} & 24.502 \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.03}   & \multicolumn{1}{l|}{4.645}  & \multicolumn{1}{l|}{0.548}  & 93.777 & \multicolumn{1}{l|}{1.475}  & \multicolumn{1}{l|}{5.411}  & \multicolumn{1}{l|}{0.551}  & 92.563 & \multicolumn{1}{l|}{0.452}  & \multicolumn{1}{l|}{1.824}  & \multicolumn{1}{l|}{0.343}  & 97.381 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{97.927} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.036}  & 1.036  & \multicolumn{1}{l|}{97.814} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.093}  & 1.093  & \multicolumn{1}{l|}{100}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{96.613} & \multicolumn{1}{l|}{0.645}  & 2.742  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{95.822} & \multicolumn{1}{l|}{0.783}  & 3.394  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{65.823} & \multicolumn{1}{l|}{0.422}  & 33.755 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1.567}  & \multicolumn{1}{l|}{1.881}  & \multicolumn{1}{l|}{96.552} & 0      & \multicolumn{1}{l|}{1.5}    & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{96}     & 0      & \multicolumn{1}{l|}{12.605} & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{78.992} & 6.723  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.99}   & \multicolumn{1}{l|}{3.564}  & \multicolumn{1}{l|}{0.99}   & 94.455 & \multicolumn{1}{l|}{1.441}  & \multicolumn{1}{l|}{2.882}  & \multicolumn{1}{l|}{1.153}  & 94.524 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.266}  & \multicolumn{1}{l|}{0.633}  & 98.101 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{84.876} & \multicolumn{1}{l|}{0.503}  & \multicolumn{1}{l|}{0.675}  & 13.945 & \multicolumn{1}{l|}{85.062} & \multicolumn{1}{l|}{0.291}  & \multicolumn{1}{l|}{0.651}  & 13.997 & \multicolumn{1}{l|}{78.659} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 21.341 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.18}   & \multicolumn{1}{l|}{91.739} & \multicolumn{1}{l|}{0.558}  & 7.524  & \multicolumn{1}{l|}{0.284}  & \multicolumn{1}{l|}{91.816} & \multicolumn{1}{l|}{0.682}  & 7.218  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{57.748} & \multicolumn{1}{l|}{0}      & 42.252 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{9.869}  & \multicolumn{1}{l|}{3.871}  & \multicolumn{1}{l|}{83.772} & 2.488  & \multicolumn{1}{l|}{9.835}  & \multicolumn{1}{l|}{3.907}  & \multicolumn{1}{l|}{83.375} & 2.883  & \multicolumn{1}{l|}{14.262} & \multicolumn{1}{l|}{4.771}  & \multicolumn{1}{l|}{69.67}  & 11.297 \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.482}  & \multicolumn{1}{l|}{4.723}  & \multicolumn{1}{l|}{0.399}  & 93.397 & \multicolumn{1}{l|}{1.663}  & \multicolumn{1}{l|}{4.704}  & \multicolumn{1}{l|}{0.341}  & 93.291 & \multicolumn{1}{l|}{1.22}   & \multicolumn{1}{l|}{1.916}  & \multicolumn{1}{l|}{0.389}  & 96.475 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with Random Forest algorithm\\ Normalized confusion matrices.}
\label{table:results:rf}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                               & \multicolumn{4}{l|}{Single subject}                                                              & \multicolumn{4}{l|}{LOSO}                                                                        \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{97.927} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.554}  & 0.518  & \multicolumn{1}{l|}{98.907} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.546}  & 0.546  & \multicolumn{1}{l|}{70}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{30}     & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{92.097} & \multicolumn{1}{l|}{0.806}  & 7.097  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{92.689} & \multicolumn{1}{l|}{0.783}  & 6.527  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{80.591} & \multicolumn{1}{l|}{0.422}  & 18.987 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{94.984} & 0.627  & \multicolumn{1}{l|}{4.5}    & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{93}     & 0      & \multicolumn{1}{l|}{4.202}  & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{91.597} & 2.521  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.99}   & \multicolumn{1}{l|}{7.921}  & \multicolumn{1}{l|}{1.188}  & 89.901 & \multicolumn{1}{l|}{1.729}  & \multicolumn{1}{l|}{4.899}  & \multicolumn{1}{l|}{1.153}  & 92.219 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{13.291} & \multicolumn{1}{l|}{0.633}  & 86.076 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{84.399} & \multicolumn{1}{l|}{0.185}  & \multicolumn{1}{l|}{1.139}  & 14.276 & \multicolumn{1}{l|}{83.899} & \multicolumn{1}{l|}{0.263}  & \multicolumn{1}{l|}{1.094}  & 14.745 & \multicolumn{1}{l|}{89.024} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 10.976 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.003}  & \multicolumn{1}{l|}{87.343} & \multicolumn{1}{l|}{0.837}  & 11.817 & \multicolumn{1}{l|}{0.003}  & \multicolumn{1}{l|}{89.498} & \multicolumn{1}{l|}{1.044}  & 9.455  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{73.445} & \multicolumn{1}{l|}{0}      & 26.555 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3.227}  & \multicolumn{1}{l|}{2.918}  & \multicolumn{1}{l|}{89.928} & 3.927  & \multicolumn{1}{l|}{4.11}   & \multicolumn{1}{l|}{3.358}  & \multicolumn{1}{l|}{88.246} & 4.285  & \multicolumn{1}{l|}{5.087}  & \multicolumn{1}{l|}{3.051}  & \multicolumn{1}{l|}{83.788} & 8.074  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.928}  & \multicolumn{1}{l|}{7.97}   & \multicolumn{1}{l|}{0.953}  & 90.149 & \multicolumn{1}{l|}{1.176}  & \multicolumn{1}{l|}{7.603}  & \multicolumn{1}{l|}{0.748}  & 90.473 & \multicolumn{1}{l|}{0.441}  & \multicolumn{1}{l|}{8.208}  & \multicolumn{1}{l|}{0.967}  & 90.385 \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{91.192} & \multicolumn{1}{l|}{1.036}  & \multicolumn{1}{l|}{2.591}  & 5.181  & \multicolumn{1}{l|}{93.989} & \multicolumn{1}{l|}{0.546}  & \multicolumn{1}{l|}{1.093}  & 4.372  & \multicolumn{1}{l|}{70}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{30}     & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{96.266} & \multicolumn{1}{l|}{0.649}  & 3.084  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{94.987} & \multicolumn{1}{l|}{0.792}  & 4.222  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{86.92}  & \multicolumn{1}{l|}{0.422}  & 12.658 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1.567}  & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{96.238} & 0      & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{3}      & \multicolumn{1}{l|}{95}     & 0      & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{2.521}  & \multicolumn{1}{l|}{94.958} & 0.84   \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{6}      & \multicolumn{1}{l|}{0.8}    & 91.2   & \multicolumn{1}{l|}{2.924}  & \multicolumn{1}{l|}{5.556}  & \multicolumn{1}{l|}{0.877}  & 90.643 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.633}  & 99.367 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{62.588} & \multicolumn{1}{l|}{1.139}  & \multicolumn{1}{l|}{0.94}   & 35.333 & \multicolumn{1}{l|}{64.35}  & \multicolumn{1}{l|}{0.305}  & \multicolumn{1}{l|}{0.678}  & 34.667 & \multicolumn{1}{l|}{53.049} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 46.951 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.138}  & \multicolumn{1}{l|}{92.414} & \multicolumn{1}{l|}{0.547}  & 6.901  & \multicolumn{1}{l|}{0.302}  & \multicolumn{1}{l|}{90.53}  & \multicolumn{1}{l|}{0.788}  & 8.38   & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{77.674} & \multicolumn{1}{l|}{0.13}   & 22.196 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2.831}  & \multicolumn{1}{l|}{5.467}  & \multicolumn{1}{l|}{84.287} & 7.415  & \multicolumn{1}{l|}{3.432}  & \multicolumn{1}{l|}{4.756}  & \multicolumn{1}{l|}{84.648} & 7.164  & \multicolumn{1}{l|}{5.354}  & \multicolumn{1}{l|}{5.152}  & \multicolumn{1}{l|}{78.549} & 10.945 \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.65}   & \multicolumn{1}{l|}{5.076}  & \multicolumn{1}{l|}{0.464}  & 93.81  & \multicolumn{1}{l|}{0.956}  & \multicolumn{1}{l|}{5.063}  & \multicolumn{1}{l|}{0.413}  & 93.569 & \multicolumn{1}{l|}{0.124}  & \multicolumn{1}{l|}{2.169}  & \multicolumn{1}{l|}{0.355}  & 97.351 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{95.337} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2.591}  & 2.073  & \multicolumn{1}{l|}{96.175} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.639}  & 2.186  & \multicolumn{1}{l|}{100}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{95.645} & \multicolumn{1}{l|}{0.645}  & 3.71   & \multicolumn{1}{l|}{0.261}  & \multicolumn{1}{l|}{94.778} & \multicolumn{1}{l|}{0.783}  & 4.178  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{83.122} & \multicolumn{1}{l|}{0.422}  & 16.456 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1.254}  & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{96.552} & 0      & \multicolumn{1}{l|}{1.5}    & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{96}     & 0      & \multicolumn{1}{l|}{6.723}  & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{91.597} & 0      \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.584}  & \multicolumn{1}{l|}{4.752}  & \multicolumn{1}{l|}{1.188}  & 92.475 & \multicolumn{1}{l|}{2.305}  & \multicolumn{1}{l|}{5.764}  & \multicolumn{1}{l|}{1.153}  & 90.778 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.266}  & \multicolumn{1}{l|}{0.633}  & 98.101 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{79.221} & \multicolumn{1}{l|}{0.874}  & \multicolumn{1}{l|}{1.099}  & 18.805 & \multicolumn{1}{l|}{78.845} & \multicolumn{1}{l|}{0.415}  & \multicolumn{1}{l|}{1.121}  & 19.618 & \multicolumn{1}{l|}{75.61}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 24.39  \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.287}  & \multicolumn{1}{l|}{92.831} & \multicolumn{1}{l|}{0.577}  & 6.305  & \multicolumn{1}{l|}{0.579}  & \multicolumn{1}{l|}{91.861} & \multicolumn{1}{l|}{0.803}  & 6.757  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{77.071} & \multicolumn{1}{l|}{0}      & 22.929 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{9.071}  & \multicolumn{1}{l|}{4.992}  & \multicolumn{1}{l|}{82.108} & 3.829  & \multicolumn{1}{l|}{10.033} & \multicolumn{1}{l|}{4.881}  & \multicolumn{1}{l|}{80.921} & 4.166  & \multicolumn{1}{l|}{13.989} & \multicolumn{1}{l|}{3.44}   & \multicolumn{1}{l|}{75.693} & 6.879  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.989}  & \multicolumn{1}{l|}{6.352}  & \multicolumn{1}{l|}{0.404}  & 92.255 & \multicolumn{1}{l|}{1.241}  & \multicolumn{1}{l|}{5.836}  & \multicolumn{1}{l|}{0.342}  & 92.581 & \multicolumn{1}{l|}{0.559}  & \multicolumn{1}{l|}{3.323}  & \multicolumn{1}{l|}{0.43}   & 95.689 \\ \hline
\end{tabular}

}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with Adaboost algorithm\\ Normalized confusion matrices.}
\label{table:results:ada}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                               & \multicolumn{4}{l|}{Single subject}                                                              & \multicolumn{4}{l|}{LOSO}                                                                        \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{96.373} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3.109}  & 0.518  & \multicolumn{1}{l|}{96.721} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2.732}  & 0.546  & \multicolumn{1}{l|}{70}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{30}     & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{94.194} & \multicolumn{1}{l|}{0.806}  & 5      & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{94.517} & \multicolumn{1}{l|}{1.044}  & 4.439  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{78.903} & \multicolumn{1}{l|}{0.422}  & 20.675 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1.567}  & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{96.238} & 0      & \multicolumn{1}{l|}{4}      & \multicolumn{1}{l|}{3.5}    & \multicolumn{1}{l|}{92.5}   & 0      & \multicolumn{1}{l|}{6.723}  & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{86.555} & 5.042  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.188}  & \multicolumn{1}{l|}{6.535}  & \multicolumn{1}{l|}{0.792}  & 91.485 & \multicolumn{1}{l|}{1.441}  & \multicolumn{1}{l|}{8.357}  & \multicolumn{1}{l|}{0.576}  & 89.625 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{5.696}  & \multicolumn{1}{l|}{0.633}  & 93.671 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{84.399} & \multicolumn{1}{l|}{0.185}  & \multicolumn{1}{l|}{0.768}  & 14.647 & \multicolumn{1}{l|}{80.756} & \multicolumn{1}{l|}{0.872}  & \multicolumn{1}{l|}{2.284}  & 16.087 & \multicolumn{1}{l|}{89.024} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 10.976 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.029}  & \multicolumn{1}{l|}{89.81}  & \multicolumn{1}{l|}{0.842}  & 9.32   & \multicolumn{1}{l|}{0.211}  & \multicolumn{1}{l|}{87.467} & \multicolumn{1}{l|}{1.193}  & 11.128 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{71.282} & \multicolumn{1}{l|}{0}      & 28.718 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3.362}  & \multicolumn{1}{l|}{2.96}   & \multicolumn{1}{l|}{90.665} & 3.013  & \multicolumn{1}{l|}{4.304}  & \multicolumn{1}{l|}{4.562}  & \multicolumn{1}{l|}{86.23}  & 4.904  & \multicolumn{1}{l|}{9.225}  & \multicolumn{1}{l|}{3.49}   & \multicolumn{1}{l|}{76.937} & 10.348 \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.832}  & \multicolumn{1}{l|}{8.314}  & \multicolumn{1}{l|}{1.014}  & 89.841 & \multicolumn{1}{l|}{1.025}  & \multicolumn{1}{l|}{8.451}  & \multicolumn{1}{l|}{0.662}  & 89.862 & \multicolumn{1}{l|}{0.489}  & \multicolumn{1}{l|}{7.969}  & \multicolumn{1}{l|}{0.896}  & 90.646 \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{93.264} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2.591}  & 4.145  & \multicolumn{1}{l|}{93.443} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2.186}  & 4.372  & \multicolumn{1}{l|}{70}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{10}     & 20     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{96.916} & \multicolumn{1}{l|}{0.649}  & 2.435  & \multicolumn{1}{l|}{0.264}  & \multicolumn{1}{l|}{93.668} & \multicolumn{1}{l|}{1.319}  & 4.749  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{89.873} & \multicolumn{1}{l|}{0.422}  & 9.705  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{0.94}   & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{96.865} & 0      & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{3.5}    & \multicolumn{1}{l|}{94}     & 0.5    & \multicolumn{1}{l|}{3.361}  & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{94.958} & 0      \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2.2}    & \multicolumn{1}{l|}{4.8}    & \multicolumn{1}{l|}{0.8}    & 92.2   & \multicolumn{1}{l|}{2.632}  & \multicolumn{1}{l|}{6.14}   & \multicolumn{1}{l|}{1.17}   & 90.058 & \multicolumn{1}{l|}{0.633}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.633}  & 98.734 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{66.481} & \multicolumn{1}{l|}{0.821}  & \multicolumn{1}{l|}{1.099}  & 31.598 & \multicolumn{1}{l|}{67.077} & \multicolumn{1}{l|}{0.997}  & \multicolumn{1}{l|}{1.495}  & 30.431 & \multicolumn{1}{l|}{41.768} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.305}  & 57.927 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.151}  & \multicolumn{1}{l|}{92.149} & \multicolumn{1}{l|}{0.596}  & 7.105  & \multicolumn{1}{l|}{0.77}   & \multicolumn{1}{l|}{89.463} & \multicolumn{1}{l|}{1.153}  & 8.614  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{77.745} & \multicolumn{1}{l|}{0}      & 22.255 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3.233}  & \multicolumn{1}{l|}{5.369}  & \multicolumn{1}{l|}{83.862} & 7.536  & \multicolumn{1}{l|}{5.208}  & \multicolumn{1}{l|}{5.402}  & \multicolumn{1}{l|}{81.516} & 7.874  & \multicolumn{1}{l|}{7.009}  & \multicolumn{1}{l|}{4.375}  & \multicolumn{1}{l|}{77.635} & 10.981 \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.733}  & \multicolumn{1}{l|}{4.585}  & \multicolumn{1}{l|}{0.434}  & 94.248 & \multicolumn{1}{l|}{1.17}   & \multicolumn{1}{l|}{4.946}  & \multicolumn{1}{l|}{0.52}   & 93.364 & \multicolumn{1}{l|}{0.166}  & \multicolumn{1}{l|}{2.074}  & \multicolumn{1}{l|}{0.318}  & 97.442 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{97.927} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.554}  & 0.518  & \multicolumn{1}{l|}{93.989} & \multicolumn{1}{l|}{0.546}  & \multicolumn{1}{l|}{2.186}  & 3.279  & \multicolumn{1}{l|}{90}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 10     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{96.774} & \multicolumn{1}{l|}{0.645}  & 2.581  & \multicolumn{1}{l|}{0.522}  & \multicolumn{1}{l|}{93.473} & \multicolumn{1}{l|}{0.783}  & 5.222  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{85.232} & \multicolumn{1}{l|}{0.422}  & 14.346 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{0.627}  & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{97.179} & 0      & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{3.5}    & \multicolumn{1}{l|}{94.5}   & 1      & \multicolumn{1}{l|}{21.849} & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{74.79}  & 1.681  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.584}  & \multicolumn{1}{l|}{4.158}  & \multicolumn{1}{l|}{0.99}   & 93.267 & \multicolumn{1}{l|}{1.153}  & \multicolumn{1}{l|}{3.458}  & \multicolumn{1}{l|}{1.729}  & 93.66  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.633}  & \multicolumn{1}{l|}{0.633}  & 98.734 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{80.93}  & \multicolumn{1}{l|}{0.649}  & \multicolumn{1}{l|}{0.596}  & 17.825 & \multicolumn{1}{l|}{75.813} & \multicolumn{1}{l|}{1.025}  & \multicolumn{1}{l|}{3.101}  & 20.061 & \multicolumn{1}{l|}{69.207} & \multicolumn{1}{l|}{0.305}  & \multicolumn{1}{l|}{0}      & 30.488 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.224}  & \multicolumn{1}{l|}{93.766} & \multicolumn{1}{l|}{0.619}  & 5.391  & \multicolumn{1}{l|}{0.647}  & \multicolumn{1}{l|}{88.733} & \multicolumn{1}{l|}{1.585}  & 9.035  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{78.285} & \multicolumn{1}{l|}{0}      & 21.715 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{7.817}  & \multicolumn{1}{l|}{4.551}  & \multicolumn{1}{l|}{84.177} & 3.455  & \multicolumn{1}{l|}{8.603}  & \multicolumn{1}{l|}{6.938}  & \multicolumn{1}{l|}{79.546} & 4.913  & \multicolumn{1}{l|}{20.717} & \multicolumn{1}{l|}{3.504}  & \multicolumn{1}{l|}{68.986} & 6.793  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.091}  & \multicolumn{1}{l|}{5.748}  & \multicolumn{1}{l|}{0.43}   & 92.731 & \multicolumn{1}{l|}{1.226}  & \multicolumn{1}{l|}{6.753}  & \multicolumn{1}{l|}{0.387}  & 91.634 & \multicolumn{1}{l|}{0.542}  & \multicolumn{1}{l|}{3.395}  & \multicolumn{1}{l|}{0.441}  & 95.622 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with GMM algorithm\\ Normalized confusion matrices.}
\label{table:results:gmm}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                               & \multicolumn{4}{l|}{Single subject}                                                              & \multicolumn{4}{l|}{LOSO}                                                                        \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{95.337} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{4.145}  & 0.518  & \multicolumn{1}{l|}{96.175} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3.825}  & 0      & \multicolumn{1}{l|}{40}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{60}     & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.161}  & \multicolumn{1}{l|}{84.516} & \multicolumn{1}{l|}{1.613}  & 13.71  & \multicolumn{1}{l|}{0.522}  & \multicolumn{1}{l|}{83.29}  & \multicolumn{1}{l|}{5.744}  & 10.444 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{77.637} & \multicolumn{1}{l|}{1.266}  & 21.097 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1.881}  & \multicolumn{1}{l|}{1.254}  & \multicolumn{1}{l|}{95.611} & 1.254  & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{95}     & 0      & \multicolumn{1}{l|}{2.521}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{94.118} & 3.361  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.188}  & \multicolumn{1}{l|}{15.446} & \multicolumn{1}{l|}{2.574}  & 80.792 & \multicolumn{1}{l|}{1.153}  & \multicolumn{1}{l|}{15.85}  & \multicolumn{1}{l|}{2.882}  & 80.115 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{18.987} & \multicolumn{1}{l|}{0.633}  & 80.38  \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{85.803} & \multicolumn{1}{l|}{0.596}  & \multicolumn{1}{l|}{2.622}  & 10.979 & \multicolumn{1}{l|}{86.017} & \multicolumn{1}{l|}{1.025}  & \multicolumn{1}{l|}{2.658}  & 10.3   & \multicolumn{1}{l|}{72.866} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{16.768} & 10.366 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.058}  & \multicolumn{1}{l|}{74.293} & \multicolumn{1}{l|}{2.308}  & 23.341 & \multicolumn{1}{l|}{0.174}  & \multicolumn{1}{l|}{78.715} & \multicolumn{1}{l|}{3.782}  & 17.329 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{63.384} & \multicolumn{1}{l|}{0.792}  & 35.824 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2.665}  & \multicolumn{1}{l|}{2.03}   & \multicolumn{1}{l|}{93.079} & 2.226  & \multicolumn{1}{l|}{3.238}  & \multicolumn{1}{l|}{2.357}  & \multicolumn{1}{l|}{92.384} & 2.02   & \multicolumn{1}{l|}{4.13}   & \multicolumn{1}{l|}{1.454}  & \multicolumn{1}{l|}{86.997} & 7.419  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.141}  & \multicolumn{1}{l|}{8.222}  & \multicolumn{1}{l|}{1.724}  & 88.912 & \multicolumn{1}{l|}{1.63}   & \multicolumn{1}{l|}{8.036}  & \multicolumn{1}{l|}{2.089}  & 88.245 & \multicolumn{1}{l|}{0.438}  & \multicolumn{1}{l|}{8.371}  & \multicolumn{1}{l|}{1.135}  & 90.056 \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{95.337} & \multicolumn{1}{l|}{0.518}  & \multicolumn{1}{l|}{1.036}  & 3.109  & \multicolumn{1}{l|}{95.628} & \multicolumn{1}{l|}{1.093}  & \multicolumn{1}{l|}{0.546}  & 2.732  & \multicolumn{1}{l|}{50}     & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{20}     & 30     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{95.617} & \multicolumn{1}{l|}{0.649}  & 3.734  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{95.251} & \multicolumn{1}{l|}{0.792}  & 3.958  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{80.169} & \multicolumn{1}{l|}{0.422}  & 19.409 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{0.94}   & \multicolumn{1}{l|}{2.194}  & \multicolumn{1}{l|}{95.925} & 0.94   & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{2.5}    & \multicolumn{1}{l|}{96}     & 0.5    & \multicolumn{1}{l|}{0.84}   & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{60.504} & 36.975 \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{3}      & \multicolumn{1}{l|}{5.6}    & \multicolumn{1}{l|}{0.8}    & 90.6   & \multicolumn{1}{l|}{2.632}  & \multicolumn{1}{l|}{5.556}  & \multicolumn{1}{l|}{1.17}   & 90.643 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.633}  & \multicolumn{1}{l|}{0}      & 99.367 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{72.984} & \multicolumn{1}{l|}{1.192}  & \multicolumn{1}{l|}{0.755}  & 25.07  & \multicolumn{1}{l|}{72.172} & \multicolumn{1}{l|}{1.703}  & \multicolumn{1}{l|}{0.761}  & 25.363 & \multicolumn{1}{l|}{42.683} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 57.317 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.108}  & \multicolumn{1}{l|}{90.183} & \multicolumn{1}{l|}{0.516}  & 9.194  & \multicolumn{1}{l|}{0.176}  & \multicolumn{1}{l|}{87.908} & \multicolumn{1}{l|}{0.617}  & 11.3   & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{64.026} & \multicolumn{1}{l|}{0}      & 35.974 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{5.633}  & \multicolumn{1}{l|}{5.518}  & \multicolumn{1}{l|}{75.486} & 13.363 & \multicolumn{1}{l|}{5.231}  & \multicolumn{1}{l|}{7.801}  & \multicolumn{1}{l|}{76.566} & 10.402 & \multicolumn{1}{l|}{3.706}  & \multicolumn{1}{l|}{2.957}  & \multicolumn{1}{l|}{32.007} & 61.33  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.923}  & \multicolumn{1}{l|}{6.326}  & \multicolumn{1}{l|}{0.245}  & 92.505 & \multicolumn{1}{l|}{1.172}  & \multicolumn{1}{l|}{6.294}  & \multicolumn{1}{l|}{0.247}  & 92.287 & \multicolumn{1}{l|}{0.141}  & \multicolumn{1}{l|}{3.921}  & \multicolumn{1}{l|}{0.104}  & 95.834 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{5.699}  & \multicolumn{1}{l|}{41.969} & \multicolumn{1}{l|}{33.679} & 18.653 & \multicolumn{1}{l|}{10.929} & \multicolumn{1}{l|}{46.448} & \multicolumn{1}{l|}{30.601} & 12.022 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{70}     & \multicolumn{1}{l|}{0}      & 30     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{99.355} & \multicolumn{1}{l|}{0.323}  & 0.323  & \multicolumn{1}{l|}{0.522}  & \multicolumn{1}{l|}{98.172} & \multicolumn{1}{l|}{0.522}  & 0.783  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{96.203} & \multicolumn{1}{l|}{0.422}  & 3.376  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{30.721} & \multicolumn{1}{l|}{60.815} & 8.464  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{14.5}   & \multicolumn{1}{l|}{85}     & 0.5    & \multicolumn{1}{l|}{1.681}  & \multicolumn{1}{l|}{66.387} & \multicolumn{1}{l|}{31.933} & 0      \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{13.663} & \multicolumn{1}{l|}{0.99}   & 85.347 & \multicolumn{1}{l|}{3.458}  & \multicolumn{1}{l|}{33.141} & \multicolumn{1}{l|}{5.764}  & 57.637 & \multicolumn{1}{l|}{0.633}  & \multicolumn{1}{l|}{4.43}   & \multicolumn{1}{l|}{0}      & 94.937 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{11.018} & \multicolumn{1}{l|}{32.592} & \multicolumn{1}{l|}{16.74}  & 39.65  & \multicolumn{1}{l|}{0.235}  & \multicolumn{1}{l|}{50.422} & \multicolumn{1}{l|}{32.812} & 16.531 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{60.061} & \multicolumn{1}{l|}{0}      & 39.939 \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{97.04}  & \multicolumn{1}{l|}{0.27}   & 2.689  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{97.146} & \multicolumn{1}{l|}{0.566}  & 2.288  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{94.451} & \multicolumn{1}{l|}{0}      & 5.549  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2.715}  & \multicolumn{1}{l|}{40.281} & \multicolumn{1}{l|}{39.334} & 17.67  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{50.867} & \multicolumn{1}{l|}{47.214} & 1.919  & \multicolumn{1}{l|}{3.476}  & \multicolumn{1}{l|}{65.662} & \multicolumn{1}{l|}{26.545} & 4.317  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.161}  & \multicolumn{1}{l|}{11.463} & \multicolumn{1}{l|}{0.418}  & 87.958 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{15.754} & \multicolumn{1}{l|}{2.508}  & 81.738 & \multicolumn{1}{l|}{0.18}   & \multicolumn{1}{l|}{10.78}  & \multicolumn{1}{l|}{0.195}  & 88.846 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with LSTM RNNs\\ Normalized confusion matrices.}
\label{table:results:lstm}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                               & \multicolumn{4}{l|}{Single subject}                                                              & \multicolumn{4}{l|}{LOSO}                                                                        \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{99.085} & \multicolumn{1}{l|}{0.076}  & \multicolumn{1}{l|}{0.153}  & 0.686  & \multicolumn{1}{l|}{98.808} & \multicolumn{1}{l|}{0.159}  & \multicolumn{1}{l|}{0.556}  & 0.477  & \multicolumn{1}{l|}{100}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 0      \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.036}  & \multicolumn{1}{l|}{96.483} & \multicolumn{1}{l|}{0.58}   & 2.901  & \multicolumn{1}{l|}{0.235}  & \multicolumn{1}{l|}{94.975} & \multicolumn{1}{l|}{0.823}  & 3.967  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{88.027} & \multicolumn{1}{l|}{0.473}  & 11.5   \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{0.07}   & \multicolumn{1}{l|}{2.369}  & \multicolumn{1}{l|}{97.353} & 0.209  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0.944}  & \multicolumn{1}{l|}{98.889} & 0.167  & \multicolumn{1}{l|}{1.214}  & \multicolumn{1}{l|}{7.003}  & \multicolumn{1}{l|}{88.422} & 3.361  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0.276}  & \multicolumn{1}{l|}{3.259}  & \multicolumn{1}{l|}{0.501}  & 95.964 & \multicolumn{1}{l|}{0.139}  & \multicolumn{1}{l|}{3.555}  & \multicolumn{1}{l|}{0.627}  & 95.678 & \multicolumn{1}{l|}{0.179}  & \multicolumn{1}{l|}{1.875}  & \multicolumn{1}{l|}{0.804}  & 97.143 \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{82.047} & \multicolumn{1}{l|}{0.465}  & \multicolumn{1}{l|}{0.744}  & 16.744 & \multicolumn{1}{l|}{82.056} & \multicolumn{1}{l|}{0.582}  & \multicolumn{1}{l|}{0.582}  & 16.78  & \multicolumn{1}{l|}{90.909} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 9.091  \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0.05}   & \multicolumn{1}{l|}{89.562} & \multicolumn{1}{l|}{0.825}  & 9.562  & \multicolumn{1}{l|}{0.098}  & \multicolumn{1}{l|}{90.085} & \multicolumn{1}{l|}{0.837}  & 8.979  & \multicolumn{1}{l|}{0.026}  & \multicolumn{1}{l|}{79.261} & \multicolumn{1}{l|}{0.104}  & 20.609 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2.91}   & \multicolumn{1}{l|}{3.246}  & \multicolumn{1}{l|}{91.959} & 1.884  & \multicolumn{1}{l|}{3.583}  & \multicolumn{1}{l|}{4.257}  & \multicolumn{1}{l|}{89.832} & 2.328  & \multicolumn{1}{l|}{2.387}  & \multicolumn{1}{l|}{9.165}  & \multicolumn{1}{l|}{82.53}  & 5.919  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1.027}  & \multicolumn{1}{l|}{3.913}  & \multicolumn{1}{l|}{1.016}  & 94.045 & \multicolumn{1}{l|}{1.07}   & \multicolumn{1}{l|}{4.605}  & \multicolumn{1}{l|}{0.963}  & 93.362 & \multicolumn{1}{l|}{1.128}  & \multicolumn{1}{l|}{2.728}  & \multicolumn{1}{l|}{0.716}  & 95.428 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with CNNs\\ Normalized confusion matrices.}
\label{table:results:cnn}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                      &                            &        & \multicolumn{4}{l|}{Multi subject}                                                               & \multicolumn{4}{l|}{Single subject}                                                              & \multicolumn{4}{l|}{LOSO}                                                                        \\ \hline
                      &                            &        & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug}   & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  \\ \hline
\multirow{8}{*}{Time} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{83.753} & \multicolumn{1}{l|}{1.292}  & \multicolumn{1}{l|}{1.156}  & 13.8   & \multicolumn{1}{l|}{88.061} & \multicolumn{1}{l|}{0.069}  & \multicolumn{1}{l|}{0.828}  & 11.042 & \multicolumn{1}{l|}{63.636} & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 36.364 \\ \cline{3-15}
                      &                            & Exhale & \multicolumn{1}{l|}{0.043}  & \multicolumn{1}{l|}{96.537} & \multicolumn{1}{l|}{1.425}  & 1.995  & \multicolumn{1}{l|}{0.002}  & \multicolumn{1}{l|}{92.264} & \multicolumn{1}{l|}{1.565}  & 6.168  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{91.826} & \multicolumn{1}{l|}{0.43}   & 7.745  \\ \cline{3-15}
                      &                            & Inhale & \multicolumn{1}{l|}{0.048}  & \multicolumn{1}{l|}{2.637}  & \multicolumn{1}{l|}{97.19}  & 0.124  & \multicolumn{1}{l|}{0.058}  & \multicolumn{1}{l|}{3.427}  & \multicolumn{1}{l|}{96.322} & 0.193  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1.727}  & \multicolumn{1}{l|}{98.066} & 0.207  \\ \cline{3-15}
                      &                            & Noise  & \multicolumn{1}{l|}{0.974}  & \multicolumn{1}{l|}{9.475}  & \multicolumn{1}{l|}{2.147}  & 87.404 & \multicolumn{1}{l|}{1.24}   & \multicolumn{1}{l|}{8.468}  & \multicolumn{1}{l|}{1.427}  & 88.865 & \multicolumn{1}{l|}{0.116}  & \multicolumn{1}{l|}{0.581}  & \multicolumn{1}{l|}{4.355}  & 94.948 \\ \cline{2-15}
                      & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{65.316} & \multicolumn{1}{l|}{0.662}  & \multicolumn{1}{l|}{1.086}  & 32.936 & \multicolumn{1}{l|}{65.056} & \multicolumn{1}{l|}{0.471}  & \multicolumn{1}{l|}{3.143}  & 31.33  & \multicolumn{1}{l|}{66.768} & \multicolumn{1}{l|}{0.305}  & \multicolumn{1}{l|}{0}      & 32.927 \\ \cline{3-15}
                      &                            & Exhale & \multicolumn{1}{l|}{0.098}  & \multicolumn{1}{l|}{88.828} & \multicolumn{1}{l|}{0.892}  & 10.181 & \multicolumn{1}{l|}{0.131}  & \multicolumn{1}{l|}{83.73}  & \multicolumn{1}{l|}{1.596}  & 14.543 & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{86.707} & \multicolumn{1}{l|}{0}      & 13.293 \\ \cline{3-15}
                      &                            & Inhale & \multicolumn{1}{l|}{3.646}  & \multicolumn{1}{l|}{4.599}  & \multicolumn{1}{l|}{85.85}  & 5.906  & \multicolumn{1}{l|}{3.229}  & \multicolumn{1}{l|}{4.802}  & \multicolumn{1}{l|}{87.789} & 4.179  & \multicolumn{1}{l|}{1.403}  & \multicolumn{1}{l|}{1.785}  & \multicolumn{1}{l|}{93.481} & 3.332  \\ \cline{3-15}
                      &                            & Noise  & \multicolumn{1}{l|}{1.379}  & \multicolumn{1}{l|}{3.791}  & \multicolumn{1}{l|}{0.495}  & 94.335 & \multicolumn{1}{l|}{1.386}  & \multicolumn{1}{l|}{3.895}  & \multicolumn{1}{l|}{0.758}  & 93.961 & \multicolumn{1}{l|}{1.746}  & \multicolumn{1}{l|}{2.452}  & \multicolumn{1}{l|}{0.664}  & 95.138 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with SVM algorithm\\ Non-normalized confusion matrices.}
\label{table:results:svm:raw}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                             & \multicolumn{4}{l|}{Single subject}                                                            & \multicolumn{4}{l|}{LOSO}                                                                     \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{190}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 0      & \multicolumn{1}{l|}{181}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2}      & 0      & \multicolumn{1}{l|}{9}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{611}    & \multicolumn{1}{l|}{5}      & 4      & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{373}    & \multicolumn{1}{l|}{4}      & 6      & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{231}    & \multicolumn{1}{l|}{2}      & 4     \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{304}    & 0      & \multicolumn{1}{l|}{6}    & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{189}    & 0      & \multicolumn{1}{l|}{3}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{113}    & 1     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{365}    & \multicolumn{1}{l|}{8}      & 128    & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{222}    & \multicolumn{1}{l|}{6}      & 115    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{143}    & \multicolumn{1}{l|}{2}      & 13    \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{6472} & \multicolumn{1}{l|}{151}    & \multicolumn{1}{l|}{91}     & 837    & \multicolumn{1}{l|}{6182} & \multicolumn{1}{l|}{145}    & \multicolumn{1}{l|}{89}     & 807    & \multicolumn{1}{l|}{298}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 30    \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{26}   & \multicolumn{1}{l|}{64056}  & \multicolumn{1}{l|}{685}    & 343    & \multicolumn{1}{l|}{18}   & \multicolumn{1}{l|}{38680}  & \multicolumn{1}{l|}{626}    & 412    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{24675}  & \multicolumn{1}{l|}{140}    & 559   \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1624} & \multicolumn{1}{l|}{1530}   & \multicolumn{1}{l|}{31643}  & 778    & \multicolumn{1}{l|}{1209} & \multicolumn{1}{l|}{904}    & \multicolumn{1}{l|}{18872}  & 693    & \multicolumn{1}{l|}{1064} & \multicolumn{1}{l|}{634}    & \multicolumn{1}{l|}{11768}  & 431   \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2535} & \multicolumn{1}{l|}{211064} & \multicolumn{1}{l|}{1692}   & 11832  & \multicolumn{1}{l|}{2184} & \multicolumn{1}{l|}{140515} & \multicolumn{1}{l|}{846}    & 11256  & \multicolumn{1}{l|}{639}  & \multicolumn{1}{l|}{69878}  & \multicolumn{1}{l|}{488}    & 1317  \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{182}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{6}      & 5      & \multicolumn{1}{l|}{176}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 4      & \multicolumn{1}{l|}{9}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{597}    & \multicolumn{1}{l|}{4}      & 15     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{364}    & \multicolumn{1}{l|}{3}      & 12     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{161}    & \multicolumn{1}{l|}{1}      & 75    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{308}    & 1      & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{194}    & 0      & \multicolumn{1}{l|}{23}   & \multicolumn{1}{l|}{3}      & \multicolumn{1}{l|}{86}     & 7     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{10}   & \multicolumn{1}{l|}{20}     & \multicolumn{1}{l|}{5}      & 465    & \multicolumn{1}{l|}{9}    & \multicolumn{1}{l|}{17}     & \multicolumn{1}{l|}{4}      & 312    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{1}      & 156   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{5527} & \multicolumn{1}{l|}{17}     & \multicolumn{1}{l|}{111}    & 1896   & \multicolumn{1}{l|}{5432} & \multicolumn{1}{l|}{14}     & \multicolumn{1}{l|}{107}    & 1670   & \multicolumn{1}{l|}{191}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2}      & 135   \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{111}  & \multicolumn{1}{l|}{59693}  & \multicolumn{1}{l|}{287}    & 5019   & \multicolumn{1}{l|}{113}  & \multicolumn{1}{l|}{36398}  & \multicolumn{1}{l|}{276}    & 2949   & \multicolumn{1}{l|}{10}   & \multicolumn{1}{l|}{14556}  & \multicolumn{1}{l|}{0}      & 10808 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2028} & \multicolumn{1}{l|}{1487}   & \multicolumn{1}{l|}{29703}  & 2357   & \multicolumn{1}{l|}{1529} & \multicolumn{1}{l|}{955}    & \multicolumn{1}{l|}{18355}  & 839    & \multicolumn{1}{l|}{2415} & \multicolumn{1}{l|}{830}    & \multicolumn{1}{l|}{7247}   & 3405  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2339} & \multicolumn{1}{l|}{10549}  & \multicolumn{1}{l|}{1245}   & 212990 & \multicolumn{1}{l|}{2283} & \multicolumn{1}{l|}{8377}   & \multicolumn{1}{l|}{853}    & 143288 & \multicolumn{1}{l|}{327}  & \multicolumn{1}{l|}{1319}   & \multicolumn{1}{l|}{248}    & 70428 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{189}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2}      & 2      & \multicolumn{1}{l|}{179}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2}      & 2      & \multicolumn{1}{l|}{10}   & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{599}    & \multicolumn{1}{l|}{4}      & 17     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{367}    & \multicolumn{1}{l|}{3}      & 13     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{156}    & \multicolumn{1}{l|}{1}      & 80    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{6}      & \multicolumn{1}{l|}{308}    & 0      & \multicolumn{1}{l|}{3}    & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{192}    & 0      & \multicolumn{1}{l|}{15}   & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{94}     & 8     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{18}     & \multicolumn{1}{l|}{5}      & 477    & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{10}     & \multicolumn{1}{l|}{4}      & 328    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{1}      & 155   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{6409} & \multicolumn{1}{l|}{38}     & \multicolumn{1}{l|}{51}     & 1053   & \multicolumn{1}{l|}{6144} & \multicolumn{1}{l|}{21}     & \multicolumn{1}{l|}{47}     & 1011   & \multicolumn{1}{l|}{258}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 70    \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{117}  & \multicolumn{1}{l|}{59731}  & \multicolumn{1}{l|}{363}    & 4899   & \multicolumn{1}{l|}{113}  & \multicolumn{1}{l|}{36484}  & \multicolumn{1}{l|}{271}    & 2868   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{14653}  & \multicolumn{1}{l|}{0}      & 10721 \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3511} & \multicolumn{1}{l|}{1377}   & \multicolumn{1}{l|}{29802}  & 885    & \multicolumn{1}{l|}{2132} & \multicolumn{1}{l|}{847}    & \multicolumn{1}{l|}{18074}  & 625    & \multicolumn{1}{l|}{1982} & \multicolumn{1}{l|}{663}    & \multicolumn{1}{l|}{9682}   & 1570  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{3365} & \multicolumn{1}{l|}{10726}  & \multicolumn{1}{l|}{907}    & 212125 & \multicolumn{1}{l|}{2575} & \multicolumn{1}{l|}{7282}   & \multicolumn{1}{l|}{528}    & 144416 & \multicolumn{1}{l|}{882}  & \multicolumn{1}{l|}{1386}   & \multicolumn{1}{l|}{281}    & 69773 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with Random Forest algorithm\\ Non-normalized confusion matrices.}
\label{table:results:rf:raw}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                             & \multicolumn{4}{l|}{Single subject}                                                            & \multicolumn{4}{l|}{LOSO}                                                                     \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{189}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 1      & \multicolumn{1}{l|}{181}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1}      & 1      & \multicolumn{1}{l|}{7}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{571}    & \multicolumn{1}{l|}{5}      & 44     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{355}    & \multicolumn{1}{l|}{3}      & 25     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{191}    & \multicolumn{1}{l|}{1}      & 45    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{7}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{303}    & 2      & \multicolumn{1}{l|}{9}    & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{186}    & 0      & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{109}    & 3     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{40}     & \multicolumn{1}{l|}{6}      & 454    & \multicolumn{1}{l|}{6}    & \multicolumn{1}{l|}{17}     & \multicolumn{1}{l|}{4}      & 320    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{21}     & \multicolumn{1}{l|}{1}      & 136   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{6373} & \multicolumn{1}{l|}{14}     & \multicolumn{1}{l|}{86}     & 1078   & \multicolumn{1}{l|}{6060} & \multicolumn{1}{l|}{19}     & \multicolumn{1}{l|}{79}     & 1065   & \multicolumn{1}{l|}{292}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 36    \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{56869}  & \multicolumn{1}{l|}{545}    & 7694   & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{35563}  & \multicolumn{1}{l|}{415}    & 3757   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{18636}  & \multicolumn{1}{l|}{0}      & 6738  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1148} & \multicolumn{1}{l|}{1038}   & \multicolumn{1}{l|}{31992}  & 1397   & \multicolumn{1}{l|}{891}  & \multicolumn{1}{l|}{728}    & \multicolumn{1}{l|}{19130}  & 929    & \multicolumn{1}{l|}{707}  & \multicolumn{1}{l|}{424}    & \multicolumn{1}{l|}{11644}  & 1122  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2108} & \multicolumn{1}{l|}{18101}  & \multicolumn{1}{l|}{2165}   & 204749 & \multicolumn{1}{l|}{1820} & \multicolumn{1}{l|}{11770}  & \multicolumn{1}{l|}{1158}   & 140053 & \multicolumn{1}{l|}{319}  & \multicolumn{1}{l|}{5936}   & \multicolumn{1}{l|}{699}    & 65368 \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{176}  & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{5}      & 10     & \multicolumn{1}{l|}{172}  & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{2}      & 8      & \multicolumn{1}{l|}{7}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{593}    & \multicolumn{1}{l|}{4}      & 19     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{360}    & \multicolumn{1}{l|}{3}      & 16     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{206}    & \multicolumn{1}{l|}{1}      & 30    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{307}    & 0      & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{6}      & \multicolumn{1}{l|}{190}    & 0      & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{3}      & \multicolumn{1}{l|}{113}    & 1     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{10}   & \multicolumn{1}{l|}{30}     & \multicolumn{1}{l|}{4}      & 456    & \multicolumn{1}{l|}{10}   & \multicolumn{1}{l|}{19}     & \multicolumn{1}{l|}{3}      & 310    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1}      & 157   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{4726} & \multicolumn{1}{l|}{86}     & \multicolumn{1}{l|}{71}     & 2668   & \multicolumn{1}{l|}{4648} & \multicolumn{1}{l|}{22}     & \multicolumn{1}{l|}{49}     & 2504   & \multicolumn{1}{l|}{174}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 154   \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{90}   & \multicolumn{1}{l|}{60171}  & \multicolumn{1}{l|}{356}    & 4493   & \multicolumn{1}{l|}{120}  & \multicolumn{1}{l|}{35973}  & \multicolumn{1}{l|}{313}    & 3330   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{19709}  & \multicolumn{1}{l|}{33}     & 5632  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1007} & \multicolumn{1}{l|}{1945}   & \multicolumn{1}{l|}{29985}  & 2638   & \multicolumn{1}{l|}{744}  & \multicolumn{1}{l|}{1031}   & \multicolumn{1}{l|}{18350}  & 1553   & \multicolumn{1}{l|}{744}  & \multicolumn{1}{l|}{716}    & \multicolumn{1}{l|}{10916}  & 1521  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1477} & \multicolumn{1}{l|}{11529}  & \multicolumn{1}{l|}{1053}   & 213064 & \multicolumn{1}{l|}{1480} & \multicolumn{1}{l|}{7837}   & \multicolumn{1}{l|}{639}    & 144845 & \multicolumn{1}{l|}{90}   & \multicolumn{1}{l|}{1569}   & \multicolumn{1}{l|}{257}    & 70406 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{184}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{5}      & 4      & \multicolumn{1}{l|}{176}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 4      & \multicolumn{1}{l|}{10}   & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{593}    & \multicolumn{1}{l|}{4}      & 23     & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{363}    & \multicolumn{1}{l|}{3}      & 16     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{197}    & \multicolumn{1}{l|}{1}      & 39    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{308}    & 0      & \multicolumn{1}{l|}{3}    & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{192}    & 0      & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{109}    & 0     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{24}     & \multicolumn{1}{l|}{6}      & 467    & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{20}     & \multicolumn{1}{l|}{4}      & 315    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{1}      & 155   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{5982} & \multicolumn{1}{l|}{66}     & \multicolumn{1}{l|}{83}     & 1420   & \multicolumn{1}{l|}{5695} & \multicolumn{1}{l|}{30}     & \multicolumn{1}{l|}{81}     & 1417   & \multicolumn{1}{l|}{248}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 80    \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{187}  & \multicolumn{1}{l|}{60442}  & \multicolumn{1}{l|}{376}    & 4105   & \multicolumn{1}{l|}{230}  & \multicolumn{1}{l|}{36502}  & \multicolumn{1}{l|}{319}    & 2685   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{19556}  & \multicolumn{1}{l|}{0}      & 5818  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3227} & \multicolumn{1}{l|}{1776}   & \multicolumn{1}{l|}{29210}  & 1362   & \multicolumn{1}{l|}{2175} & \multicolumn{1}{l|}{1058}   & \multicolumn{1}{l|}{17542}  & 903    & \multicolumn{1}{l|}{1944} & \multicolumn{1}{l|}{478}    & \multicolumn{1}{l|}{10519}  & 956   \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2246} & \multicolumn{1}{l|}{14427}  & \multicolumn{1}{l|}{918}    & 209532 & \multicolumn{1}{l|}{1921} & \multicolumn{1}{l|}{9034}   & \multicolumn{1}{l|}{529}    & 143317 & \multicolumn{1}{l|}{404}  & \multicolumn{1}{l|}{2403}   & \multicolumn{1}{l|}{311}    & 69204 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with Adaboost algorithm\\ Non-normalized confusion matrices.}
\label{table:results:ada:raw}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                             & \multicolumn{4}{l|}{Single subject}                                                            & \multicolumn{4}{l|}{LOSO}                                                                     \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{186}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{6}      & 1      & \multicolumn{1}{l|}{177}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{5}      & 1      & \multicolumn{1}{l|}{7}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{584}    & \multicolumn{1}{l|}{5}      & 31     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{362}    & \multicolumn{1}{l|}{4}      & 17     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{187}    & \multicolumn{1}{l|}{1}      & 49    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{307}    & 0      & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{185}    & 0      & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{103}    & 6     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{6}    & \multicolumn{1}{l|}{33}     & \multicolumn{1}{l|}{4}      & 462    & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{29}     & \multicolumn{1}{l|}{2}      & 311    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{9}      & \multicolumn{1}{l|}{1}      & 148   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{6373} & \multicolumn{1}{l|}{14}     & \multicolumn{1}{l|}{58}     & 1106   & \multicolumn{1}{l|}{5833} & \multicolumn{1}{l|}{63}     & \multicolumn{1}{l|}{165}    & 1162   & \multicolumn{1}{l|}{292}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 36    \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{19}   & \multicolumn{1}{l|}{58475}  & \multicolumn{1}{l|}{548}    & 6068   & \multicolumn{1}{l|}{84}   & \multicolumn{1}{l|}{34756}  & \multicolumn{1}{l|}{474}    & 4422   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{18087}  & \multicolumn{1}{l|}{0}      & 7287  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1196} & \multicolumn{1}{l|}{1053}   & \multicolumn{1}{l|}{32254}  & 1072   & \multicolumn{1}{l|}{933}  & \multicolumn{1}{l|}{989}    & \multicolumn{1}{l|}{18693}  & 1063   & \multicolumn{1}{l|}{1282} & \multicolumn{1}{l|}{485}    & \multicolumn{1}{l|}{10692}  & 1438  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1890} & \multicolumn{1}{l|}{18882}  & \multicolumn{1}{l|}{2302}   & 204049 & \multicolumn{1}{l|}{1586} & \multicolumn{1}{l|}{13083}  & \multicolumn{1}{l|}{1025}   & 139107 & \multicolumn{1}{l|}{354}  & \multicolumn{1}{l|}{5763}   & \multicolumn{1}{l|}{648}    & 65557 \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{180}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{5}      & 8      & \multicolumn{1}{l|}{171}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{4}      & 8      & \multicolumn{1}{l|}{7}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1}      & 2     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{597}    & \multicolumn{1}{l|}{4}      & 15     & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{355}    & \multicolumn{1}{l|}{5}      & 18     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{213}    & \multicolumn{1}{l|}{1}      & 23    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{309}    & 0      & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{188}    & 1      & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{113}    & 0     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{11}   & \multicolumn{1}{l|}{24}     & \multicolumn{1}{l|}{4}      & 461    & \multicolumn{1}{l|}{9}    & \multicolumn{1}{l|}{21}     & \multicolumn{1}{l|}{4}      & 308    & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1}      & 156   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{5020} & \multicolumn{1}{l|}{62}     & \multicolumn{1}{l|}{83}     & 2386   & \multicolumn{1}{l|}{4845} & \multicolumn{1}{l|}{72}     & \multicolumn{1}{l|}{108}    & 2198   & \multicolumn{1}{l|}{137}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{1}      & 190   \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{98}   & \multicolumn{1}{l|}{59998}  & \multicolumn{1}{l|}{388}    & 4626   & \multicolumn{1}{l|}{306}  & \multicolumn{1}{l|}{35549}  & \multicolumn{1}{l|}{458}    & 3423   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{19727}  & \multicolumn{1}{l|}{0}      & 5647  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{1150} & \multicolumn{1}{l|}{1910}   & \multicolumn{1}{l|}{29834}  & 2681   & \multicolumn{1}{l|}{1129} & \multicolumn{1}{l|}{1171}   & \multicolumn{1}{l|}{17671}  & 1707   & \multicolumn{1}{l|}{974}  & \multicolumn{1}{l|}{608}    & \multicolumn{1}{l|}{10789}  & 1526  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{1665} & \multicolumn{1}{l|}{10414}  & \multicolumn{1}{l|}{985}    & 214059 & \multicolumn{1}{l|}{1811} & \multicolumn{1}{l|}{7657}   & \multicolumn{1}{l|}{805}    & 144528 & \multicolumn{1}{l|}{120}  & \multicolumn{1}{l|}{1500}   & \multicolumn{1}{l|}{230}    & 70472 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{189}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{3}      & 1      & \multicolumn{1}{l|}{172}  & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{4}      & 6      & \multicolumn{1}{l|}{9}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 1     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{600}    & \multicolumn{1}{l|}{4}      & 16     & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{358}    & \multicolumn{1}{l|}{3}      & 20     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{202}    & \multicolumn{1}{l|}{1}      & 34    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{310}    & 0      & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{189}    & 2      & \multicolumn{1}{l|}{26}   & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{89}     & 2     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{21}     & \multicolumn{1}{l|}{5}      & 471    & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{12}     & \multicolumn{1}{l|}{6}      & 325    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{1}      & 156   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{6111} & \multicolumn{1}{l|}{49}     & \multicolumn{1}{l|}{45}     & 1346   & \multicolumn{1}{l|}{5476} & \multicolumn{1}{l|}{74}     & \multicolumn{1}{l|}{224}    & 1449   & \multicolumn{1}{l|}{227}  & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{0}      & 100   \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{146}  & \multicolumn{1}{l|}{61051}  & \multicolumn{1}{l|}{403}    & 3510   & \multicolumn{1}{l|}{257}  & \multicolumn{1}{l|}{35259}  & \multicolumn{1}{l|}{630}    & 3590   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{19864}  & \multicolumn{1}{l|}{0}      & 5510  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2781} & \multicolumn{1}{l|}{1619}   & \multicolumn{1}{l|}{29946}  & 1229   & \multicolumn{1}{l|}{1865} & \multicolumn{1}{l|}{1504}   & \multicolumn{1}{l|}{17244}  & 1065   & \multicolumn{1}{l|}{2879} & \multicolumn{1}{l|}{487}    & \multicolumn{1}{l|}{9587}   & 944   \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2478} & \multicolumn{1}{l|}{13054}  & \multicolumn{1}{l|}{977}    & 210614 & \multicolumn{1}{l|}{1898} & \multicolumn{1}{l|}{10454}  & \multicolumn{1}{l|}{599}    & 141850 & \multicolumn{1}{l|}{392}  & \multicolumn{1}{l|}{2455}   & \multicolumn{1}{l|}{319}    & 69156 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with GMM based algorithm\\ Non-normalized confusion matrices.}
\label{table:results:gmm:raw}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                             & \multicolumn{4}{l|}{Single subject}                                                            & \multicolumn{4}{l|}{LOSO}                                                                     \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{184}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{8}      & 1      & \multicolumn{1}{l|}{176}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{7}      & 0      & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{6}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{524}    & \multicolumn{1}{l|}{10}     & 85     & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{319}    & \multicolumn{1}{l|}{22}     & 40     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{184}    & \multicolumn{1}{l|}{3}      & 50    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{6}    & \multicolumn{1}{l|}{4}      & \multicolumn{1}{l|}{305}    & 4      & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{190}    & 0      & \multicolumn{1}{l|}{3}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{112}    & 4     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{6}    & \multicolumn{1}{l|}{78}     & \multicolumn{1}{l|}{13}     & 408    & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{55}     & \multicolumn{1}{l|}{10}     & 278    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{30}     & \multicolumn{1}{l|}{1}      & 127   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{6479} & \multicolumn{1}{l|}{45}     & \multicolumn{1}{l|}{198}    & 829    & \multicolumn{1}{l|}{6213} & \multicolumn{1}{l|}{74}     & \multicolumn{1}{l|}{192}    & 744    & \multicolumn{1}{l|}{239}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{55}     & 34    \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{38}   & \multicolumn{1}{l|}{48372}  & \multicolumn{1}{l|}{1503}   & 15197  & \multicolumn{1}{l|}{69}   & \multicolumn{1}{l|}{31278}  & \multicolumn{1}{l|}{1503}   & 6886   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{16083}  & \multicolumn{1}{l|}{201}    & 9090  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{948}  & \multicolumn{1}{l|}{722}    & \multicolumn{1}{l|}{33113}  & 792    & \multicolumn{1}{l|}{702}  & \multicolumn{1}{l|}{511}    & \multicolumn{1}{l|}{20027}  & 438    & \multicolumn{1}{l|}{574}  & \multicolumn{1}{l|}{202}    & \multicolumn{1}{l|}{12090}  & 1031  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2592} & \multicolumn{1}{l|}{18675}  & \multicolumn{1}{l|}{3916}   & 201940 & \multicolumn{1}{l|}{2523} & \multicolumn{1}{l|}{12440}  & \multicolumn{1}{l|}{3234}   & 136604 & \multicolumn{1}{l|}{317}  & \multicolumn{1}{l|}{6054}   & \multicolumn{1}{l|}{821}    & 65130 \\ \hline
\multirow{8}{*}{Cepst} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{184}  & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{2}      & 6      & \multicolumn{1}{l|}{175}  & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{1}      & 5      & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{2}      & 3     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{589}    & \multicolumn{1}{l|}{4}      & 23     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{361}    & \multicolumn{1}{l|}{3}      & 15     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{190}    & \multicolumn{1}{l|}{1}      & 46    \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{3}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{306}    & 3      & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{192}    & 1      & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{72}     & 44    \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{15}   & \multicolumn{1}{l|}{28}     & \multicolumn{1}{l|}{4}      & 453    & \multicolumn{1}{l|}{9}    & \multicolumn{1}{l|}{19}     & \multicolumn{1}{l|}{4}      & 310    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{0}      & 157   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{5511} & \multicolumn{1}{l|}{90}     & \multicolumn{1}{l|}{57}     & 1893   & \multicolumn{1}{l|}{5213} & \multicolumn{1}{l|}{123}    & \multicolumn{1}{l|}{55}     & 1832   & \multicolumn{1}{l|}{140}  & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 188   \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{70}   & \multicolumn{1}{l|}{58718}  & \multicolumn{1}{l|}{336}    & 5986   & \multicolumn{1}{l|}{70}   & \multicolumn{1}{l|}{34931}  & \multicolumn{1}{l|}{245}    & 4490   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{16246}  & \multicolumn{1}{l|}{0}      & 9128  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2004} & \multicolumn{1}{l|}{1963}   & \multicolumn{1}{l|}{26854}  & 4754   & \multicolumn{1}{l|}{1134} & \multicolumn{1}{l|}{1691}   & \multicolumn{1}{l|}{16598}  & 2255   & \multicolumn{1}{l|}{515}  & \multicolumn{1}{l|}{411}    & \multicolumn{1}{l|}{4448}   & 8523  \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{2097} & \multicolumn{1}{l|}{14368}  & \multicolumn{1}{l|}{557}    & 210101 & \multicolumn{1}{l|}{1815} & \multicolumn{1}{l|}{9743}   & \multicolumn{1}{l|}{382}    & 142861 & \multicolumn{1}{l|}{102}  & \multicolumn{1}{l|}{2836}   & \multicolumn{1}{l|}{75}     & 69309 \\ \hline
\multirow{8}{*}{MFCC}  & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{11}   & \multicolumn{1}{l|}{81}     & \multicolumn{1}{l|}{65}     & 36     & \multicolumn{1}{l|}{20}   & \multicolumn{1}{l|}{85}     & \multicolumn{1}{l|}{56}     & 22     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{0}      & 3     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{616}    & \multicolumn{1}{l|}{2}      & 2      & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{376}    & \multicolumn{1}{l|}{2}      & 3      & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{228}    & \multicolumn{1}{l|}{1}      & 8     \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{98}     & \multicolumn{1}{l|}{194}    & 27     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{29}     & \multicolumn{1}{l|}{170}    & 1      & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{79}     & \multicolumn{1}{l|}{38}     & 0     \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{69}     & \multicolumn{1}{l|}{5}      & 431    & \multicolumn{1}{l|}{12}   & \multicolumn{1}{l|}{115}    & \multicolumn{1}{l|}{20}     & 200    & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{7}      & \multicolumn{1}{l|}{0}      & 150   \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{832}  & \multicolumn{1}{l|}{2461}   & \multicolumn{1}{l|}{1264}   & 2994   & \multicolumn{1}{l|}{17}   & \multicolumn{1}{l|}{3642}   & \multicolumn{1}{l|}{2370}   & 1194   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{197}    & \multicolumn{1}{l|}{0}      & 131   \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{63183}  & \multicolumn{1}{l|}{176}    & 1751   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{38602}  & \multicolumn{1}{l|}{225}    & 909    & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{23966}  & \multicolumn{1}{l|}{0}      & 1408  \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{966}  & \multicolumn{1}{l|}{14330}  & \multicolumn{1}{l|}{13993}  & 6286   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{11027}  & \multicolumn{1}{l|}{10235}  & 416    & \multicolumn{1}{l|}{483}  & \multicolumn{1}{l|}{9125}   & \multicolumn{1}{l|}{3689}   & 600   \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{365}  & \multicolumn{1}{l|}{26035}  & \multicolumn{1}{l|}{950}    & 199773 & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{24388}  & \multicolumn{1}{l|}{3882}   & 126531 & \multicolumn{1}{l|}{130}  & \multicolumn{1}{l|}{7796}   & \multicolumn{1}{l|}{141}    & 64255 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with LSTM RNNs\\ Non-normalized confusion matrices.}
\label{table:results:lstm:raw}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                       &                            &        & \multicolumn{4}{l|}{Multi subject}                                                            & \multicolumn{4}{l|}{Single subject}                                                           & \multicolumn{4}{l|}{LOSO}                                                                     \\ \hline
                       &                            &        & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise \\ \hline
\multirow{8}{*}{Spect} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{1299} & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{2}      & 9     & \multicolumn{1}{l|}{1243} & \multicolumn{1}{l|}{2}      & \multicolumn{1}{l|}{7}      & 6     & \multicolumn{1}{l|}{53}   & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 0     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{5322}   & \multicolumn{1}{l|}{32}     & 160   & \multicolumn{1}{l|}{8}    & \multicolumn{1}{l|}{3232}   & \multicolumn{1}{l|}{28}     & 135   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{1860}   & \multicolumn{1}{l|}{10}     & 243   \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{68}     & \multicolumn{1}{l|}{2795}   & 6     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{17}     & \multicolumn{1}{l|}{1780}   & 3     & \multicolumn{1}{l|}{13}   & \multicolumn{1}{l|}{75}     & \multicolumn{1}{l|}{947}    & 36    \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{11}   & \multicolumn{1}{l|}{130}    & \multicolumn{1}{l|}{20}     & 3828  & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{102}    & \multicolumn{1}{l|}{18}     & 2745  & \multicolumn{1}{l|}{2}    & \multicolumn{1}{l|}{21}     & \multicolumn{1}{l|}{9}      & 1088  \\ \cline{2-15}
                       & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{882}  & \multicolumn{1}{l|}{5}      & \multicolumn{1}{l|}{8}      & 180   & \multicolumn{1}{l|}{846}  & \multicolumn{1}{l|}{6}      & \multicolumn{1}{l|}{6}      & 173   & \multicolumn{1}{l|}{40}   & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 4     \\ \cline{3-15}
                       &                            & Exhale & \multicolumn{1}{l|}{5}    & \multicolumn{1}{l|}{8898}   & \multicolumn{1}{l|}{82}     & 950   & \multicolumn{1}{l|}{6}    & \multicolumn{1}{l|}{5488}   & \multicolumn{1}{l|}{51}     & 547   & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{3046}   & \multicolumn{1}{l|}{4}      & 792   \\ \cline{3-15}
                       &                            & Inhale & \multicolumn{1}{l|}{156}  & \multicolumn{1}{l|}{174}    & \multicolumn{1}{l|}{4929}   & 101   & \multicolumn{1}{l|}{117}  & \multicolumn{1}{l|}{139}    & \multicolumn{1}{l|}{2933}   & 76    & \multicolumn{1}{l|}{50}   & \multicolumn{1}{l|}{192}    & \multicolumn{1}{l|}{1729}   & 124   \\ \cline{3-15}
                       &                            & Noise  & \multicolumn{1}{l|}{381}  & \multicolumn{1}{l|}{1452}   & \multicolumn{1}{l|}{377}    & 34901 & \multicolumn{1}{l|}{270}  & \multicolumn{1}{l|}{1162}   & \multicolumn{1}{l|}{243}    & 23559 & \multicolumn{1}{l|}{134}  & \multicolumn{1}{l|}{324}    & \multicolumn{1}{l|}{85}     & 11334 \\ \hline
\end{tabular}
}
\end{table*}

\begin{table*}
\caption{Experimental evaluation with CNNs \\ Non-normalized confusion matrices.}
\label{table:results:cnn:raw}
\centering
\resizebox{\textwidth}{!}{
\begin{tabular}{|l|l|l|llll|llll|llll|}
\hline
                      &                            &        & \multicolumn{4}{l|}{Multi subject}                                                             & \multicolumn{4}{l|}{Single subject}                                                            & \multicolumn{4}{l|}{LOSO}                                                                     \\ \hline
                      &                            &        & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise  & \multicolumn{1}{l|}{Drug} & \multicolumn{1}{l|}{Exhale} & \multicolumn{1}{l|}{Inhale} & Noise \\ \hline
\multirow{8}{*}{Time} & \multirow{4}{*}{Non-mixed} & Drug   & \multicolumn{1}{l|}{1232} & \multicolumn{1}{l|}{19}     & \multicolumn{1}{l|}{17}     & 203    & \multicolumn{1}{l|}{1276} & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{12}     & 160    & \multicolumn{1}{l|}{14}   & \multicolumn{1}{l|}{0}      & \multicolumn{1}{l|}{0}      & 8     \\ \cline{3-15}
                      &                            & Exhale & \multicolumn{1}{l|}{36}   & \multicolumn{1}{l|}{80906}  & \multicolumn{1}{l|}{1194}   & 1672   & \multicolumn{1}{l|}{1}    & \multicolumn{1}{l|}{47268}  & \multicolumn{1}{l|}{802}    & 3160   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{29914}  & \multicolumn{1}{l|}{140}    & 2523  \\ \cline{3-15}
                      &                            & Inhale & \multicolumn{1}{l|}{22}   & \multicolumn{1}{l|}{1209}   & \multicolumn{1}{l|}{44554}  & 57     & \multicolumn{1}{l|}{16}   & \multicolumn{1}{l|}{942}    & \multicolumn{1}{l|}{26480}  & 53     & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{317}    & \multicolumn{1}{l|}{17996}  & 38    \\ \cline{3-15}
                      &                            & Noise  & \multicolumn{1}{l|}{215}  & \multicolumn{1}{l|}{2092}   & \multicolumn{1}{l|}{474}    & 19298  & \multicolumn{1}{l|}{231}  & \multicolumn{1}{l|}{1578}   & \multicolumn{1}{l|}{266}    & 16560  & \multicolumn{1}{l|}{4}    & \multicolumn{1}{l|}{20}     & \multicolumn{1}{l|}{150}    & 3270  \\ \cline{2-15}
                      & \multirow{4}{*}{Mixed}     & Drug   & \multicolumn{1}{l|}{4932} & \multicolumn{1}{l|}{50}     & \multicolumn{1}{l|}{82}     & 2487   & \multicolumn{1}{l|}{4699} & \multicolumn{1}{l|}{34}     & \multicolumn{1}{l|}{227}    & 2263   & \multicolumn{1}{l|}{219}  & \multicolumn{1}{l|}{1}      & \multicolumn{1}{l|}{0}      & 108   \\ \cline{3-15}
                      &                            & Exhale & \multicolumn{1}{l|}{64}   & \multicolumn{1}{l|}{57836}  & \multicolumn{1}{l|}{581}    & 6629   & \multicolumn{1}{l|}{52}   & \multicolumn{1}{l|}{33271}  & \multicolumn{1}{l|}{634}    & 5779   & \multicolumn{1}{l|}{0}    & \multicolumn{1}{l|}{22001}  & \multicolumn{1}{l|}{0}      & 3373  \\ \cline{3-15}
                      &                            & Inhale & \multicolumn{1}{l|}{1297} & \multicolumn{1}{l|}{1636}   & \multicolumn{1}{l|}{30541}  & 2101   & \multicolumn{1}{l|}{700}  & \multicolumn{1}{l|}{1041}   & \multicolumn{1}{l|}{19031}  & 906    & \multicolumn{1}{l|}{195}  & \multicolumn{1}{l|}{248}    & \multicolumn{1}{l|}{12991}  & 463   \\ \cline{3-15}
                      &                            & Noise  & \multicolumn{1}{l|}{3133} & \multicolumn{1}{l|}{8610}   & \multicolumn{1}{l|}{1124}   & 214256 & \multicolumn{1}{l|}{2146} & \multicolumn{1}{l|}{6030}   & \multicolumn{1}{l|}{1173}   & 145452 & \multicolumn{1}{l|}{1263} & \multicolumn{1}{l|}{1773}   & \multicolumn{1}{l|}{480}    & 68806 \\ \hline
\end{tabular}
}
\end{table*}

\newpage

redpajama_set_name: RedPajamaArXiv