*Article* **A Machine Learning Framework to Predict Nutrient Content in Valencia-Orange Leaf Hyperspectral Measurements**

**Lucas Prado Osco 1,\*, Ana Paula Marques Ramos 2, Mayara Maezano Faita Pinheiro 2, Érika Akemi Saito Moriya 3, Nilton Nobuhiro Imai 3, Nayara Estrabis 1, Felipe Ianczyk 1, Fábio Fernando de Araújo 4, Veraldo Liesenberg 5, Lúcio André de Castro Jorge 6, Jonathan Li 7, Lingfei Ma 7, Wesley Nunes Gonçalves 1, José Marcato Junior <sup>1</sup> and José Eduardo Creste <sup>4</sup>**


Received: 4 February 2020; Accepted: 7 March 2020; Published: 12 March 2020

**Abstract:** This paper presents a framework based on machine learning algorithms to predict nutrient content in leaf hyperspectral measurements. This is the first approach to evaluate macro- and micronutrient content with both machine learning and reflectance/first-derivative data. For this, citrus-leaves collected at a Valencia-orange orchard were used. Their spectral data was measured with a Fieldspec ASD FieldSpec® HandHeld 2 spectroradiometer and the surface reflectance and first-derivative spectra from the spectral range of 380 to 1020 nm (640 spectral bands) was evaluated. A total of 320 spectral signatures were collected, and the leaf-nutrient content (N, P, K, Mg, S, Cu, Fe, Mn, and Zn) was associated with them. For this, 204,800 (320 × 640) combinations were used. The following machine learning algorithms were used in this framework: k-Nearest Neighbor (kNN), Lasso Regression, Ridge Regression, Support Vector Machine (SVM), Artificial Neural Network (ANN), Decision Tree (DT), and Random Forest (RF). The training methods were assessed based on Cross-Validation and Leave-One-Out. The Relief-F metric of the algorithms' prediction was used to determine the most contributive wavelength or spectral region associated with each nutrient. This approach was able to return, with high predictions (R2), nutrients like N (0.912), Mg (0.832), Cu (0.861), Mn (0.898), and Zn (0.855), and, to a lesser extent, P (0.771), K (0.763), and S (0.727). These accuracies were obtained with different algorithms, but RF was the most suitable to model most of them. The results indicate that, for the Valencia-orange leaves, surface reflectance data is more suitable to predict macronutrients, while first-derivative spectra is better linked to micronutrients. A final contribution of this study is the identification of the wavelengths responsible for contributing to these predictions.

**Keywords:** spectroscopy; proximal sensor; macronutrient; micronutrient; artificial intelligence
