# Reconstruction of Ultra-High Vacuum Mass Spectra Using Genetic Algorithms
## 3 Results
In Table 4 we compare the IE obtained by the two methods using the same pre-selection by the ML algorithm for the case of a MS containing a different number of random gases. According to the results, for the case of the reconstruction of spectra generated by two gases, we obtain a better result from GAs for all three probability thresholds. Similarly, for the spectra generated by the combination of five gases, we also obtain a better result from GAs in all cases. However, in the case of the spectra generated with 10 gases, the results are practically identical, reaching a similar IE for both techniques. Consequently, we confirm that GAs can obtain similar or better accuracy than the iterative deconvolution technique in all of the tested scenarios. To better interpret Table 4, in Table 5 we present a comparison between the relative performances (IE) of both methods. We highlight in bold the most advantageous scenarios for the GA. As indicated before, the proposed method based on GA stands out specifically for lower-probability thresholds and with low-complexity spectra (composed by 2 gases). The IE reached was up to 112 times lower for the GA in the best scenario (2-gas MS and threshold = 0.3), while for a 10-gas MS, both methods behave similarly (ratio of 1). \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Reconstruction Method**} & \multirow{2}{*}{**Number of Gases**} & \multicolumn{3}{c}{**Threshold**} \\ \cline{3-5}  & & **0.5** & **0.4** & **0.3** \\ \hline Genetic Algorithm & \multirow{2}{*}{2} & 0.00025 & 0.00021 & 0.00011 \\ Iterative Deconvolution & & 0.00942 & 0.01293 & 0.01237 \\ \hline Genetic Algorithm & \multirow{2}{*}{5} & 0.0194 & 0.0147 & 0.0108 \\ Iterative Deconvolution & & 0.0818 & 0.0414 & 0.0486 \\ \hline Genetic Algorithm & \multirow{2}{*}{10} & 0.42 & 0.34 & 0.23 \\ Iterative Deconvolution & & 0.43 & 0.35 & 0.23 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison of the medians of the IE distribution obtained for the reconstruction of the MS generated with 2, 5 and 10 gases by different techniques. Figure 3: Absolute value of the differences between the real and the reconstructed spectrum for each mass. It is also relevant to mention that the IE values obtained by GAs and those obtained by iterative deconvolution are statistically independent. Since IE medians are being compared, it is convenient to use the Wilcoxon test. This test essentially calculates the difference between sets of pairs and analyzes these differences to establish if they are significantly different from one another. The results of this test are presented in Table 6.  
All \(p\)-values are lower than 0.05, which indicates that the different sets of IE obtained by each one of the techniques used are statistically independent. This proves that both techniques behave differently and, consequently, a comparison between both methods is possible. Once the IE results have been presented and compared, we may establish a comparison between the computational times involved by each method. A comparison between the average runtimes taken for the MS reconstruction by each method is shown in Table 7.  
From Table 7, we conclude that for all two-gas scenarios, the computational time improvement is limited. However, as the number of present gases in the system is increased, we observe how the improvement in runtime of the GAs over iterative deconvolution is evident. For 5 gases, the GA takes up to 3 times less time to obtain the solution, while for 10 gases, it takes 4 times less time for any threshold scenario considered. It is also worth mentioning that, for the cases where the GA significantly improves the IE, the execution time is equal, or even less than that of the iterative deconvolution, while in the case where the IE obtained is similar, the execution time of the GA is much lower than that of the iterative deconvolution. This indicates that in all cases, the GA has a substantial advantage, either in terms of IE or in terms of computational time, compared to the iterative deconvolution.