# Sensory Perception Systems and Machine Learning Methods for Pesticide Detection in Fruits
## 3 Results
### Classification of Pesticide Concentrations in Fruits with Multivariate Analysis Methods
#### 3.3.1 Plum  
Figure 7 shows the results of a PCA and LDA analysis for different concentrations of the pesticides Amistar and Funlate in plums, using an E-tongue, where the graphs illustrate the discrimination between different concentrations of pesticides and organic fruits, showing a high selectivity and repeatability in the measurements. On the other \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c} \hline \hline \multirow{3}{*}{**Metrics**} & \multicolumn{3}{c}{**Plum**} & \multicolumn{3}{c}{**Strawberry**} & \multicolumn{3}{c}{**Apple**} & \multicolumn{3}{c}{**Gooseberry**} & \\  & \multicolumn{3}{c}{**SVM (Quadratic)**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} \\ \cline{2-13}  & **Org** & **Am** & **Fu** & **Org** & **Ac** & **Br** & **Org** & **Am** & **Fu** & **Org** & **Br** & **Cu** & **Da** & **Pr** \\ \hline Precision & 100\% & 90.9\% & 90.9\% & 100\% & 90\% & 90.9\% & 90\% & 100\% & 90.0\% & 100\% & 100\% & 90.9\% & 100\% & 100\% \\ \hline Sensitivity & 80\% & 100\% & 100\% & 90\% & 90\% & 100\% & 90\% & 100\% & 90\% & 100\% & 90.0\% & 100\% & 100\% & 100\% \\ \hline Specificity & 100\% & 95\% & 95\% & 100\% & 95\% & 95\% & 95\% & 100\% & 95\% & 100\% & 100\% & 97.5\% & 100\% & 100\% \\ \hline Accuracy & 93.3\% & 93.3\% & 93.3\% & 93.3\% & 93.3\% & 93.3\% & 93.3\% & 93.3\% & 98\% & 98\% & 98\% & 98\% & 98\% \\ \hline F1 score & 88.9\% & 95.2\% & 95.2\% & 94.7\% & 90\% & 95.2\% & 90\% & 100\% & 90\% & 100\% & 94.7\% & 95.2\% & 100\% & 100\% \\ \hline NPV & 90.9\% & 100\% & 100\% & 95.2\% & 95\% & 100\% & 95\% & 100\% & 95\% & 100\% & 97.6\% & 100\% & 100\% \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Metrics obtained from the confusion matrices of different ML models for fruit pesticide identification using the E-tongue. \begin{table}
\begin{tabular}{c c c c c c c c c c c c c c} \hline \hline \multirow{3}{*}{**Metrics**} & \multicolumn{3}{c}{**Plum**} & \multicolumn{3}{c}{**Strawberry**} & \multicolumn{3}{c}{**Apple**} & \multicolumn{3}{c}{**Gooseberry**} \\  & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} & \multicolumn{3}{c}{**L. Discrimination**} \\ \cline{2-13}  & **Org** & **Am** & **Fu** & **Org** & **Ac** & **Br** & **Org** & **Am** & **Fu** & **Org** & **Br** & **Cu** & **Da** & **Pr** \\ \hline Precision & 100\% & 100\% & 87.5\% & 83.3\% & 75\% & 85.7\% & 85.7\% & 100\% & 87.5\% & 87.5\% & 100\% & 83.3\% & 88.3\% & 75\% \\ \hline Sensitivity & 85.7\% & 100\% & 100\% & 71.4\% & 85.7\% & 85.7\% & 85.7\% & 85.7\% & 100\% & 100\% & 100\% & 71.4\% & 71.4\% & 85.7\% \\ \hline Specificity & 100\% & 100\% & 92.9\% & 92.9\% & 85.7\% & 92.9\% & 92.9\% & 100\% & 92.9\% & 96.4\% & 100\% & 96.4\% & 96.4\% & 92.9\% \\ \hline Accuracy & 95.3\% & 95.3\% & 95.3\% & 81\% & 81\% & 81\% & 90.5\% & 90.5\% & 90.5\% & 85.7\% & 85.7\% & 85.7\% & 85.7\% & 85.7\% & 85.7\% \\ \hline F1 score & 92.3\% & 100\% & 93.3\% & 76.9\% & 80.\% & 85.7\% & 85.7\% & 92.3\% & 93.3\% & 93.3\% & 100\% & 76.9\% & 76.9\% & 80\% \\ \hline NPV & 93.3\% & 100.\% & 100\% & 86.7\% & 92.3\% & 92.9\% & 92.9\% & 93.3\% & 100\% & 100\% & 93.1\% & 93.1\% & 96.3\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Metrics obtained from the confusion matrix (linear discrimination function) for fruit pesticide identification using the E-nose. hand, the variance explained by PC1 alone is 92.09% for Amistar and 91.45% for Funlate, indicating a strong capacity of the E-tongue system to capture most of the variability in the data.