# Application of an Electronic Nose as a New Technology for Rapid Detection of Adulteration in Honey
## 3 Results and Discussion
### Data Processing
#### 3.2.2 Machine Learning Classification  
Despite the graphical analysis being a valuable alternative for discrimination of the clusters, this task becomes difficult in systems with a large amount of data and containing overlapping regions. Thus, to optimize and automate the treatment of data, reduce subjectivity, and increase the efficiency in the prediction of the results and the robustness of the method, the use of machine learning algorithms for the autonomous classification of the samples is more suitable [30]. In this analysis, the following classifiers were used: instance based (IBK), Kstar, Trees-J48 (J48), random forest (RF), multilayer perceptron (MLP), naive Bayes (NB), and sequential minimal optimization (SMO) [31; 32]. These algorithms were selected since they are based on different approaches. IBK and Kstar are based on the K-nearest-neighbor algorithm. These kinds of algorithms use the proximity between the data to classify or group them. The main advantage is that they are non-parametric; thus, they do not need a complex data preparation procedure. J48 and RFs are based on the decision tree algorithm, which uses a set of simple decision rules inferred from the data. This type of algorithm, in addition to being non-parametric, can consider numerical and categorical data. However, they perform well on relatively unbalanced data sets. The MLP classifier is a type of neural network used to solve problems in which the data are not linearly separable or have complex relationships [33; 34]. NB is an algorithm based on [PERSON] theorem that consists of conditional probability and takes the input attributes as independent of each other, thus simplifying the calculations and consequently the algorithm implementation [35]. Finally, SMO is an algorithm for solving the quadratic programming problem that arises in support vector machines (SVMs); the latter is a function-based algorithm that uses a hyperplane to separate data from different classes. This hyperplane is chosen considering the closest points between the classes and seeks to maximize the distance between them [36]. In this sense, based on the RR data for each cycle (Table S1) and considering different values of k-folds for the cross-validation (3, 5, and 10), the accuracy values of the different classifiers were determined and varied from 85.7% to 97.5% (Figure 4). The highest values were obtained for IBK (94.9%, 93.3%, and 97.5% for k = 10, 5, and 3, respectively) and Kstar (95.8%, 96.6%, and 96.6% for k = 10, 5, and 3, respectively). Thus, IBK and Kstar were selected as classifiers for evaluating the average of RRs (Table 2) in the same way as done previously (IBK* and Kstar*). Considering the average data of the measures taken for each sample, for both classifiers, the accuracies reached 100% for at least one k value, IBK* (94.1% for k = 10 and 3 and 100% for k = 5) and Kstar* (100% regardless of the k); in other words, in this case, these classifiers were able to attribute correctly as authentic or adulterated honey all samples considered. Another way of evaluating the ability of the e-nose-based methodology to discriminate between authentic and adulterated honey is through sensitivity and specificity parameters. Sensitivity is the number of true-positive samples that the applied method identifies, while specificity is the rate of true negatives that are correctly identified. Sensitivity and specificity were calculated according to Equations (2) and (3), respectively [32; 37]. \[\text{Sensitivity}=\text{true positive (TP)}/\text{((true positive (TP) + false negative (FN))} \tag{2}\]  
\[\text{Specificity}=\text{true negative (TN)}/\text{(true negative (TN) + false positive (FP))} \tag{3}\]In this study, the quantity of true positives corresponded to the number of data the sensor assigned as authentic honey, while the number of true negatives corresponded to adulteration. Furthermore, it is necessary to remember that for each sample, seven measurements (seven exposure cycles) were taken.