## 5 Results and Discussion  
To illustrate the results of the application of the regression algorithm which we have adopted from the TensorFlow ML platform to our synthetized H\(\alpha\)/D\(\alpha\) line spectra, we show in Figure 7 the isotopic ratio (in percentages) as predicted by the ML algorithm versus the real isotopic ratio as used in the preprocessing code to generate the H\(\alpha\)/D\(\alpha\) line profiles. The loss function of the DL algorithm for our application is shown on Figure 8 as a function of the number of iterations or epochs. To obtain results corresponding to more realistic situations, we have added Gaussian noise to the synthetized H\(\alpha\)/D\(\alpha\) line profiles. The deep learning algorithm values are scattered around the black solid line representing the \(y=x\) function. We found a mean error of 7.6% and a median error of 2.4% with respect to the expected values of the hydrogen isotopic ratio, H/H+D. Note that adding noise to the profiles makes the determination of the position of the peak of the H\(\alpha\) line difficult, and hence introduces an error in the ML feature wavelength separation. The consequence of this is that the regression algorithm introduces in turn an uncertainty on the isotopic ratios as can be seen on Figure 7. If one excludes outlier data, it can be reasonably considered that there is an overall good agreement between the predicted values of the isotopic ratio and the real values called true values in Figure 7. It is worth noting that the reasons of such relatively high error values are not due to the ML regression algorithm but are due to the difficulty of the preprocessing program in the determination of some features especially when the spectrum minima cannot be defined accurately. As this point sets limitations to the use of the regression algorithm and affects the accuracy of the predictions, it will be tackled in the near future to improve the proposed technique. Figure 7: The predicted isotopic ratio as a function of the real (theoretical isotopic ratio) and the training set; a sample of 200,000 data points were used (200,000 theoretical line profiles were generated). Now, concerning the validation of the method, we have generated a total of 20,000 other theoretical spectra in a similar mater as for the generation of the training set. The results of the DL algorithm are shown on Figure 9, as the predicted values of the hydrogen isotopic ratio are plotted as a function of the true values. For the test phase, the mean square error was estimated to be 7.9% while the median error value is 2.6%. One can see from the figure some outlier points for which the predicted values are far from the known values, but for the majority of the data, the predicted values match well the known values. The results presented here demonstrate that one can use simple spectral features of line spectra such as wavelength separation and dip-to-peak or peak-to-peak intensity ratios instead of fitting whole spectra to determine and predict isotopic ratios in H-D mixtures for conditions of divertor plasmas. We have limited our study to deuterium-hydrogen mixtures with hydrogen concentrations lying in the range 1-25%, but the results can be easily verified for the opposite situation where deuterium represents up to 25%, and also mixtures where hydrogen represents up to 50%. It should be noted that our results aimed to demonstrate the proof-of-principle of the use of ML coupled to spectroscopy to determine the isotopic ratio in H-D mixtures met in divertor plasmas of magnetic fusion devices such  
Figure 8: The loss function for the training data used for the determination of the hydrogen isotopic ratio. The less the loss is the better is the regression. Figure 9: The predicted isotopic ratio as a function of the real (theoretical isotopic ratio) for the test set where a sample of 20,000 data points were used (20,000 theoretical line profiles). as tokamaks. The next step will be the application of the method to experimental data from current tokamaks such as JET and ASDEX-Upgrade.