## 3 Results and Discussion
### Multivariate Modeling for Universal Calibration  
The acquired spectral data were employed for KRLS modeling to construct the calibration that could embrace the samples of both types. The spectral data matrix was cleaned from zero values for all the samples, as the KRLS input data may not contain missing or constant values [17]. The light (Na-Sc) and heavy (Ti-U) channel spectra were merged into a single data matrix with 3617 variables (wavelengths). Next, due to the uneven distribution of the target element content along the concentration ranges, only the samples with the concentration of the investigated elements below the threshold presented in Table S4 (Supplementary Materials) were taken into account. Otherwise, the contents that were significantly different from the rest of the samples will introduce a substantial bias into the regression modeling. The data were mean-centered and scaled with standard deviation prior to modeling. The metrics of the obtained KRLS models for the quantification of Si, Al, Ti, and Mn in the framework of the universal model for ores and steels are given in Table 1 and Figure 4.  
Figure 4: The comparison of RMSE for (**a**)—Si and Al, (**b**)—Ti and Mn. In the case of IC-PLS, the initial data matrix was composed of the X-ray fluorescence intensities of the K\({}_{\alpha}\) and K\({}_{\beta}\) lines of all the elements presented in Table S1. The data from both spectral channels were employed. Then the columns containing I\({}_{1}^{2}\), I\({}_{1}\)+I\({}_{1}\)/I\({}_{1}\) and I\({}_{1}^{2}\)/I\({}_{1}\) were added to the matrix. The number of the latent variables (LV\({}_{1}\) in Table 1) was chosen according to the minimum of RMSE in full cross-validation (RMSECV). Next, variable selection was performed. Further VIP (variables important on projection) [19] scores were considered as a metric to eliminate insignificant variables. The threshold VIP score was chosen individually for each model in the course of the following procedure: the threshold VIP score value was varied from zero to the maximum value with the step of 5% from the maximum value; the optimal value was chosen according to the minimum of RMSECV. Finally, a new model based on the variables with a VIP score more than the threshold was built and the number of latent variables (LV\({}_{2}\) in Table 1) was once again chosen according to the minimum of RMSECV. The results are shown in Table 2 and Figure 4. An example of predicted vs measured plot is shown for Al in Figure 5.  
It can be seen that IC-PLS significantly outperforms traditional FP in terms of accuracy for predicting the content of Al (0.96% vs. 3.87%) and Ti (0.05% vs. 0.09%) and yields comparable results for Si and Mn. A possible explanation for this distribution of the results among the elements can be based on the nature of X-ray fluorescence signals. In case of Al, the energy of the fluorescence lines is low and the lines have low intensities compared to other studied elements. Thus, FP (which uses a single Al K\(\alpha\) line for concentration calculation) has to deal with noisy data. Both IC-PLS and KRLS take into account numerous intensities: K\(\alpha\) and K\(\beta\) from two channels for IC-PLS, and all the whole spectra for KRLS. In the case of Ti and Mn, FP performs better as it handles more intense lines in calculations. In the case of Si, the K\(\alpha\) line is also noisy as for Al; however, the content of Si in the samples is significantly higher and the signal-to-noise ratio is less critical here, thus FP yields an accuracy similar to IC-PLS here. KRLS has shown the worst performance with the lowest accuracy for the three elements and is only better than FP in the case of Al. Nevertheless, KRLS is able to handle nonlinear matrix effects and in general yields comparable accuracy with FP.