## 3 Study Evaluation
### Experiment Settings  
This section is devoted to presenting the experiment that we performed to build both the _lung disease detection_ and the _lung disease characterisation_ models. Relating to the learning of the first model, i.e., the _lung disease detection_ one, we consider \(T_{detection}\) as a set of labels {(\(M_{detection}\), \(l_{detection}\))}, where each \(M_{detection}\) is the label that is associated with a \(l_{detection}\in\) {_healthy_, _disease_}. With regard to the _lung disease characterisation_ model training, we defined \(T_{characterisation}\) as a set of labelled instances {(\(M_{characterisation}\), \(l_{characterisation}\))}, where each \(M_{characterisation}\) is the label that is related to a different lung disease \(l_{characterisation}\in\{asthma\), \(bronchietacasis\), \(bronchiitis, COPD,\)\(LRTI\), \(pneumonia,\) and \(URTI\}\). For the two models that we consider, i.e, \(M_{detection}\) and \(M_{characterisation}\), we build a numeric vector of features \(\mathbb{F}\in R_{y}\), where \(y\) represents the feature number exploited in the learning phase (\(y=10\)). In detail, with respect to the training phase, the \(k\)-fold cross-validation is exploited. We explain this process as follows: the instances of the dataset are split in a random way into a set denoted as \(k\). In order to test the effectiveness of both the models that we propose, the procedure described below is considered:  
1. generation of set for the training, i.e., \(T\subset D\);
2. generation of an evaluation set \(T^{\prime}=D\div T\);
3. execution of the model training \(T\);
4. application of the model previously generated to each element of the \(T^{\prime}\) set. For both the classifications, we considered the full feature set exploiting the _kNN_, _SVM_, _neural network_, and _logistic regression_[27] classification algorithms. Regularisation is used in machine learning as a solution to overfitting by reducing the variance of the ML model under consideration. Regularisation can be implemented in multiple ways by either modifying the loss function, sampling method, or the training approach itself. With the aim to avoid overfitting, we exploited the cross-validation: in this way, the whole dataset was evaluated in the testing step. The k-fold cross-validation procedure involves splitting the training dataset into k folds. The first k-1 folds are used to train a model, and the holdout k-th fold is used as the test set. This process is repeated and each of the folds is given an opportunity to be used as the holdout test set. A total of k models are fit and evaluated, and the performance of the model is calculated as the mean of these runs. The procedure has been shown to give a less optimistic estimate of model performance on small training datasets than a single train/test split. A value of k = 10 has been shown to be effective across a wide range of dataset sizes and model types. We considered a version of k-fold cross-validation that preserves the imbalanced class distribution in each fold. It is called stratified k-fold cross-validation and will enforce the class distribution in each split of the data to match the distribution in the complete training dataset. In other words, the folds are selected so that each fold contains roughly the same proportions of class labels of the original dataset. Below, we explain the parameters that we considered for the models' training: for the _kNN_, _SVM_, _neural network_, and _logistic regression_ algorithms, we considered a batch size (i.e., the number of instances to process if batch prediction is being performed) equal to 100. With batch, we are referring to a term used in machine learning and it is related to the number of training examples utilized in one iteration. Moreover, for the _kNN_ model, we set the number of neighbours equal to 1.