  Citation: Abdelmigid, H.M.; Baz, M.A.; AlZain, M.A.; Al-Amri, J.F.; Zaini, H.G.; Morsi, M.M.; Abualnaja, M.; Althagafi, E.A. Machine Learning Strategy for Improved Prediction of Micronutrient Concentrations in Soils of Taif Rose Farms Based on EDXRF Spectra. Agronomy 2022, 12, 895. https://doi.org/10.3390/ agronomy12040895 Academic Editors: László Pásztor and Gábor Szatmári Received: 7 March 2022 Accepted: 3 April 2022 Published: 7 April 2022 Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affil- iations. Copyright: © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/). agronomy Article Machine Learning Strategy for Improved Prediction of Micronutrient Concentrations in Soils of Taif Rose Farms Based on EDXRF Spectra Hala M. Abdelmigid 1, * , Mohammed A. Baz 2 , Mohammed A. AlZain 3 , Jehad F. Al-Amri 3 , Hatim Ghazi Zaini 2 , Maissa M. Morsi 4 , Matokah Abualnaja 5 and Elham A. Althagafi 6 1 Department of Biotechnology, College of Science, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia 2 Department of Computer Engineering, College of Computers and Information Technology, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia; mo.baz@tu.edu.sa (M.A.B.); h.zaini@tu.edu.sa (H.G.Z.) 3 Department of Information Technology, College of Computers and Information Technology, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia; m.alzain@tu.edu.sa (M.A.A.); j.alamri@tu.edu.sa (J.F.A.-A.) 4 Department of Biology, College of Science, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia; m.moasa@tu.edu.sa 5 Department of Chemistry, Faculty of Applied Science, Umm Al-Qura University, Makkah 24230, Saudi Arabia; mmabualnaja@uqu.edu.sa 6 Central laboratories, Deanship of Scientific Research, Taif University, P.O. Box 11099, Taif 21944, Saudi Arabia; e.gaber@tu.edu.sa * Correspondence: h.majed@tu.edu.sa; Tel.: +96-655-178-5254 Abstract: This study attempts to utilize newly developed machine learning techniques in order to develop a general prediction algorithm for agricultural soils in Saudi Arabia, specifically in the Taif region. Energy dispersive X-ray fluorescence (EDXRF) measurements were used to develop national predictive models that predict the concentrations of 14 micronutrients in soils of Taif rose farms, for providing high-quality data comparable to conventional methods. Machine learning algorithms used in this study included the simple linear model, the multivariate linear regression (MLR); and two nonlinear models, the random forest (RF) and multivariate adaptive regression splines (MARS). Our study proposes a machine learning (ML) strategy for predicting fertility parameters more accurately in agricultural soils using 10 farms of the Taif rose (Rosa damascena) in Taif, Saudi Arabia as a case study. Results demonstrated that MARS provides higher prediction performance when the number of explanatory variables is small, while RF is superior when the number of variables is large. On the other hand, the MLR is recommended as a moderate method for predicting multivariate variables. The study showed that multivariate models can be used to overwhelm the drawbacks of the EDXRF device, such as high detection limits and an element that cannot be directly measured. Keywords: EDXRF; soil; Taif rose; microelements; machine learning; precision agriculture 1. Introduction One of the most important crops in the floriculture industry [1] is roses, which are used as cut flowers, potted plants, and garden plants [2] and have been used in the perfumery, cosmetics, and food industries for several years [3,4]. Roses belong to the genus Rosa which comprises over 100 widely distributed species in Asia, the Middle East, Europe, and North America [5]. Out of them, only some species have been used for essential oil manufacturing, among which R. damascena is superior in the production of high-value essential oil [6]. The name of the species (damascene) is derived from Damascus, Syria, where it originally emerged as a wild plant. Currently, it is cultivated in different countries around the world [7]. In Saudi Arabia, Rosa damascena has a prolonged history in the Western province, particularly in the Taif region, in which a high-quality rose essential oil is produced, and Agronomy 2022, 12, 895. https://doi.org/10.3390/agronomy12040895 https://www.mdpi.com/journal/agronomy