A multi-principal element alloy (MPEA) is a type of metallic alloy that is composed of multiple metallic elements, with each element making up a significant portion of the alloy. In this study, the initial atomic percentage of elements in an (AlFeNiTiVZr)1-xCrx MPEA alloy as a function of the position on the surface was investigated using machine learning algorithms. Given the absence of a linear relationship between the atomic percentage of elements and their location on the surface, it is not possible to discern any clear association from the dataset. To overcome this non-linear relationship, the prediction of the atomic percentage of elements was accomplished using both decision tree (DT) and random forest (RF) regression models. The models were compared, and the results were found to be consistent with the experimental findings (a coefficient of determination R2 of 0.98 is obtained with the DT algorithm and 0.99 with the RF one). This research demonstrates the potential of machine learning algorithms in the analysis of wavelength-dispersive X-ray spectroscopy (WDS) datasets.