## 3 Results
### Model Optimisation  
The results obtained so far showed that, despite Model 1 being capable of correctly identifying a high proportion of the concentrated positive samples, it achieved a lower performance against the diluted samples than the one observed when testing the model against the more concentrated aliquots. Thus, it was concluded that further improvement and optimization was required. The data within the training set was divided into two sets, one containing the spectra of the most concentrated corrosive samples and one with the spectra from the diluted samples. The reasoning behind this approach was to explore the influence of the presence or absence of data from concentrated and diluted samples on the performance of the model. At this stage, two models with different training libraries were designed and tested simultaneously to assess their performance against new samples. Model 2--concentrations above 15%--and Model 3--concentrations below 15%--were created and tested against a testing set identical to the one described in Section 3.2. In addition to these, a fourth model, Model 4, was designed using the data from those samples with a concentration below 15% as for Model 3, but, as an additional requirement, the model averaged the data from three scans before producing an output, (unlike prior models that used the data from a single scan) with the aim of increasing its overall accuracy. The results obtained from testing Models 2, 3, and 4 have been summarised in Tables 4-6, respectively. Model 2 showed a high proportion of TPs when used against the concentrated samples of all the tested corrosive solutions, with a rate of FN slightly lower than those observed with Model 1. However, when using Model 2 against diluted corrosive samples, which were not included in the dataset used to build this model, the performance appeared to be poorer compared to Model 1, with a higher rate of FN as well as of M, an occurrence that was barely present during the testing of Model 1. Nevertheless, when studying the \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Solution** & **TP** & **FN** & **M** \\ \hline HCl 37\% & 294 & 6 & 0 \\ HCl 10\% & 142 & 97 & 61 \\ NaOH 50\% & 291 & 9 & 0 \\ NaOH 12\% & 142 & 118 & 40 \\ NH\({}_{4}\)OH 30\% & 300 & 0 & 0 \\ NH\({}_{4}\)OH 10\% & 96 & 104 & 100 \\ H\({}_{2}\)SO\({}_{4}\) 30\% & 294 & 6 & 0 \\ H\({}_{2}\)SO\({}_{4}\) 15\% & 297 & 3 & 0 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Classification of corrosive solutions scanned through the walls of transparent and coloured PET and HDPE bottles using Model 2. TP = True Positives, FN = False Negatives, M = Misclassification. overall sensitivity of this model, the final value reached 0.84, higher than that observed in Model 1 (0.73). On the other hand, Model 3 appeared to be able to correctly classify diluted samples of all corrosive solutions in most cases, with the highest rate of FN and FP seen with diluted samples of sulfuric acid., The model was also able to correctly classify highly diluted samples, (i.e., sodium hypochlorite 1%). However, the model was unable to classify most concentrated samples of corrosive solutions, in most cases giving an 'Invalid' output. Model 4, which used the same dataset as Model 3 but with three averaged scans, showcased a similar performance to Model 3 but with a higher rate of TP when analysing the diluted samples, nearing a perfect classification in cases such as NH4 OH 10%. Due to the high proportion of samples with an invalid output, the sensitivity observed for Model 3 and 4 were 0.54 and 0.58, lower than those gathered from Models 1 and 2. Nonetheless, the overall performances for both model 3 and 4, appear not as different (refer to Figure 4). By performing a [PERSON]'s test to compare the number of TP of these two models, a X\({}^{2}\) value of 3.35 and a \(p\)-value of 0.07 are observed.