Combining Machine Learning and Vis-NIR Spectroscopy to Estimate Nutrients in Fruit Tree Leaves
Abstract
1. Introduction
2. Materials and Methods
2.1. Database Characterization
2.2. Leaf Sampling
2.3. Chemical Analysis
2.4. Vis-NIR Spectroscopy Readings and Spectral Pre-Processing
2.5. Statistical Analysis and Calibration of Prediction Models
3. Results
3.1. Descriptive Statistical Analysis of the Database
3.2. Calibration and Validation Performance of Prediction Models
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Rozane, D.E.; Paula, B.V.; Santos, E.M.H.; Tullio, L.; Conceição, M.P.; Lima Neto, A.J.; Moura-Bueno, J.M.; Trapp, T.; Hahn, L.; Brunetto, G. Indication of critical levels and sufficiency ranges of nutrients in soil and plant tissue. In Management Strategies to Improve Nutrient Use Efficiency in Fruit Crops, 1st ed.; Brunetto, G., Rozane, D.E., Loss, A., Natale, W., Eds.; Editora Palotti: Santa Maria, CA, USA, 2023; pp. 15–28. [Google Scholar]
- Brunetto, G.; Nava, G.; Ambrosini, V.G.; Comin, J.J.; Kaminski, J. The pear tree response to phosphorus and potassium fertilization. Braz. J. Fruit Grow. 2015, 37, 507–516. [Google Scholar] [CrossRef] [Scilit]
- CQFS—RS/SC—Commission for Soil Chemistry and Fertility. Manual of Liming and Fertilization for the States of Rio Grande do Sul and Santa Catarina, 11th ed.; Brazilian Soil Science Society—Southern Regional Nucleus [s.l.]: Commission for Soil Chemistry and Fertility—RS/SC: Viçosa, Brazil, 2016. [Google Scholar]
- Tassinari, A.; Stefanello, L.O.; Schwalbert, R.A.; Vitto, B.B.; Kulmann, M.S.S.; Santos, J.P.J.; Arruda, W.S.; Schwalbert, R.; Tiecher, T.L.; Ceretta, C.A.; et al. Nitrogen Critical Level in Leaves in ‘Chardonnay’ and ‘Pinot Noir’ Grapevines to Adequate Yield and Quality Must. Agronomy 2022, 12, 1132. [Google Scholar] [CrossRef] [Scilit]
- Stefanello, L.; Schwalbert, R.; Schawlbert, R.; Tassinari, A.; Garlet, L.; De Conti, L.; Ciotta, M.; Ceretta, C.; Ciampitti, I.; Brunetto, G. Phosphorus critical levels in soil and grapevine leaves for South Brazil vineyards: A Bayesian approach. Eur. J. Agron. 2023, 144, 126752. [Google Scholar] [CrossRef] [Scilit]
- Osco, L.P.; Ramos, A.P.M.; Pinheiro, M.M.F.; Moriya, E.A.S.; Imai, N.N.; Estrabis, N.; Ianczyk, F.; Araújo, F.F.; Liesenberg, V.; Jorge, L.A.C.; et al. A Machine Learning Framework to Predict Nutrient Content in Valencia-Orange Leaf Hyperspectral Measurements. Remote Sens. 2020, 12, 906. [Google Scholar] [CrossRef] [Scilit]
- Souza, R.M.; Coelho, M.S.; Rodrigues, B.J. Development of a method to prepare plant material samples for determination of Ca, Cu, Mg, Mn, Fe and Zn by FAAS. Braz. Appl. Sci. Rev. 2020, 4, 1811–1821. [Google Scholar] [CrossRef] [Scilit]
- Tedesco, M.J. Analysis of Soil, Plants, and Other Materials, 2nd ed.; Soil Department, UFRGS: Porto Alegre, Brazil, 1995. [Google Scholar]
- EMBRAPA, Brazilian Agricultural Research Corporation. Manual of Chemical Analysis of Soils, Plants and Fertilizers; EMBRAPA: Rio de Janeiro, Brazil, 2009.
- Naibo, G.; José, J.F.B.d.S.; Pesini, G.; Chemin, C.; Lisboa, B.; Kayser, L.; Abichequer, A.D.; Moura-Bueno, J.M.; Ramon, R.; Tiecher, T. Combining mid-infrared spectroscopy and machine learning to estimate nutrient content in plant tissues of yerba mate (Ilex paraguariensis A. St. Hil.). J. Food Compos. Anal. 2024, 128, 106008. [Google Scholar] [CrossRef] [Scilit]
- Zhu, G.; Wang, Q.; Zhang, S.; Guo, T.; Liu, S.; Lu, J. A meta-analysis of crop leaf nitrogen, phosphorus and potassium content estimation based on hyperspectral and multispectral remote sensing techniques. Field Crops Res. 2025, 329, 109961. [Google Scholar] [CrossRef] [Scilit]
- Páscoa, R.N.M.J. In Situ Visible and Near-infrared Spectroscopy Applied to Vineyards as a Tool for Precision Viticulture. Compr. Anal. Chem. 2018, 80, 253–279. [Google Scholar] [CrossRef] [Scilit]
- Manzano, J.I.; Rodríguez-Febereiro, M.; Fandiño, M.; Vilanova, M.; Cancela, J.J. Spectroscopic analysis (UV-VIS-NIR) for predictive modeling of macro and micronutrients in grapevine leaves. Smart Agric. Technol. 2025, 10, 100812. [Google Scholar] [CrossRef] [Scilit]
- Galvez-Sola, L.; García-Sánchez, F.; Pérez-Pérez, J.G.; Gimeno, V.; Navarro, J.M.; Moral, R.; Martínez-Nicolás, J.J.; Nieves, M. Rapid estimation of nutritional elements on citrus leaves by near infrared reflectance spectroscopy. Front. Plant Sci. 2015, 6, 571. [Google Scholar] [CrossRef] [Scilit]
- Jin, X.; Wang, L.; Zheng, W.; Zhang, X.; Liu, L.; Li, S.; Rao, Y.; Xuan, J. Predicting the nutrition deficiency of fresh pear leaves with a miniature near infrared spectrometer in the laboratory. Measurement 2022, 188, 110553. [Google Scholar] [CrossRef] [Scilit]
- Azadnia, R.; Rajabipour, A.; Jamshidi, B.; Omid, M. New approach for rapid estimation of leaf nitrogen, phosphorus, and potassium contents in apple-trees using Vis/NIR spectroscopy based on wavelength selection coupled with machine learning. Comput. Electron. Agric. 2023, 207, 107746. [Google Scholar] [CrossRef] [Scilit]
- Cuq, S.; Lemetter, V.; Kleiber, D.; Levasseur-Garc, C. Assessing macro-element content in vine leaves and grape berries of vitis vinifera by using near-infrared spectroscopy and chemometrics. Int. J. Environ. Anal. Chem. 2019, 100, 1179–1195. [Google Scholar] [CrossRef] [Scilit]
- Xiao, H.; Li, C.; Wang, M.; Huan, Z.; Mei, H.; Nie, J.; Rogers, K.M.; Wu, Z.; Yuan, Y. Nutrient Content Prediction and Geographical Origin Identification of Bananas by Combining Hyperspectral Imaging with Chemometrics. Foods 2024, 13, 3631. [Google Scholar] [CrossRef] [Scilit]
- Martin-Prével, P. International colloquium for optimizing plant nutrition. Proceedings 1984. [Google Scholar]
- Silva, D.J.; Wadt, P.G.S.; Mouco, M.A.C. Foliar diagnosis of mango crop. In Plant Nutrition: Foliar Diagnosis in Fruit Crops; Prado, R.d.M., Ed.; UNESP, Faculty of Agrarian and Veterinary Sciences: Jaboticabal, Brazil, 2012; Volume 12, pp. 311–342. [Google Scholar]
- Murphy, J.; Riley, J. A modified single solution method for the determination of phosphate in natural waters. Anal. Chim. Acta 1962, 27, 31–36. [Google Scholar] [CrossRef] [Scilit]
- Krug, F.J. Flow injection spectrophotometric determination of boron in plant material with azomethine-H. Anal. Chim. Acta 1981, 125, 29–35. [Google Scholar] [CrossRef] [Scilit]
- Rinnan, A.; Berg, F.V.; Engelsen, S.B. Review of the most common pre-processing techniques for near-infrared spectra. Trends Anal. Chem. 2009, 28, 1201–1222. [Google Scholar] [CrossRef] [Scilit]
- Savitzky, A.; Golay, M.J.E. Smooting and differentiation of data by simplified least squares procedures. Anal. Chem. 1964, 36, 1627–1639. [Google Scholar] [CrossRef] [Scilit]
- R Core Team. R: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing: Vienna, Austria, 2023; Available online: https://www.R-project.org/ (accessed on 20 November 2025).
- Stevens, A.; Ramirez-Lopez, L. An introduction to the prospectr package. In Soil Spectroscopy: An Alternative to Wet Chemistry for Soil Monitoring; Elsevier: Amsterdam, The Netherlands, 2014; pp. 339–359. [Google Scholar]
- Burnett, A.C.; Anderson, J.; Davidson, K.J.; Ely, K.S.; Lamour, J.; Li, Q.; Morrison, B.D.; Yang, D.; Rogers, A.; Serbin, S.P. A best-practice guide to predicting plant traits from leaf-level hyperspectral data using partial least squares regression. J. Exp. Bot. 2021, 72, 6175–6189. [Google Scholar] [CrossRef] [Scilit]
- Wold, S.; Sjöström, M.; Eriksson, L. PLS-regression: A basic tool of chemometrics. Chemom. Intell. Lab. Syst. 2001, 58, 109–130. [Google Scholar] [CrossRef] [Scilit]
- Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef] [Scilit]
- Kuhn, M.; Johnson, K. Applied Predictive Modeling; Springer: New York, NY, USA, 2013; Volume 26, p. 13. [Google Scholar]
- Hastie, T.; Tibshirani, R.; Friedman, J. The Elements of Statistical Learning; Springer: New York, NY, USA, 2009. [Google Scholar]
- Kuhn, M. The Caret Package; R Foundation for Statistical Computing: Vienna, Austria, 2017; Available online: https://cran.r-project.org/web/packages/caret/index.html (accessed on 20 November 2025).
- Brus, D.J.; Kempen, B.; Heuvelink, G.B.M. Sampling for validation of digital soil maps. Eur. J. Soil Sci. 2011, 62, 394–407. [Google Scholar] [CrossRef] [Scilit]
- Lin, L.I. A concordance correlation coefficient to evaluate reproducibility. Biometrics 1989, 45, 255–268. [Google Scholar] [CrossRef] [Scilit]
- Willmott, C.J.; Matsuura, K. Advantages of the mean absolute error (MAE) over the root mean square error (RMSE) in assessing average model performance. Clim. Res. 2005, 30, 79–82. [Google Scholar] [CrossRef] [Scilit]
- Chai, T.; Draxler, R.R. Root mean square error (RMSE) or mean absolute error (MAE)? Geosci. Model Dev. 2014, 7, 1247–1250. [Google Scholar] [CrossRef] [Scilit]
- Bellon Maurel, V.; Fernandez-Ahumada, E.; Palagos, B.; Roger, J.M.; Mcbratney, A. Prediction of soil attributes by NIR spectroscopy. A critical review of chemometric indicators commonly used for assessing the quality of the prediction. Trends Anal. Chem. 2010, 29, 1073–1081. [Google Scholar] [CrossRef] [Scilit]
- Cantarella, H.; Quaggio, J.A.; Mattos, D., Jr.; Boaretto, R.M.; Raij, B.V. Bulletin 100: Fertilization and Liming Recommendations for the State of São Paulo, 3rd ed.; Agronomic Institute of Campinas: Campinas, Brazil, 2022; p. 500. [Google Scholar]
- Silva, D.J.; Pereira, J.R.; Mouco, M.A.C.; Alburquerque, J.A.S.; Raij, B.V.; Silva, C.A. Mineral Nutrition and Fertilization of Mango Trees Under Irrigated Conditions; Embrapa: Petrolina, Brazil, 2004.
- Marschner, P. Marschner’s Mineral Nutrition of Higher Plants, 30th ed.; Academic Press: Cambridge, MA, USA, 2012. [Google Scholar]
- Naibo, G.; José, J.F.B.D.S.; Zanotelli, C.C.; Pesini, G.; Lisboa, B.B.; Vargas, L.K.; Moura-Bueno, J.M.; Fior, C.S.; Tiecher, T. Near-infrared spectroscopy and machine learning to estimate the physical and chemical properties of soils cultivated with Ilex paraguariensis. Environ. Technol. Innov. 2025, 40, 104409. [Google Scholar] [CrossRef] [Scilit]
- Moura-Bueno, J.M.; Dalmolin, R.S.D.; Horst-Heinen, T.; Caten, A.T.; Vasques, G.M.; Dotto, A.C.; Grunwald, S. When does stratification of a subtropical soil spectral library improve predictions of soil organic carbon content? Sci. Total Environ. 2020, 737, 139895. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- IBAMA, Brazilian Institute of Environment and Renewable Natural Resources. CAS 8018-01-7; Environmental Profile: Mancozeb. IBAMA: Brasília, Brazil, 2019.
- Sônego, O.R.; Garrido, L.R.; Grigoletti Júnior, A. Main Fungal Diseases of Grapevine in Southern Brazil; Embrapa Grape and Wine: Bento Gonçalves, Brazil, 2005. [Google Scholar]
- de Oliveira, L.F.R.; Santana, R.C. Estimation of leaf nutrient concentration from hyperspectral reflectance in Eucalyptus using partial least squares regression. Sci. Agric. 2020, 77, e20180409. [Google Scholar] [CrossRef] [Scilit]
- Oliveira, F.N.S.; de Aquino, A.R.L.; Lima, A.A.C. Correction of Acidity and Mineral Fertilization in Cerrado Soils Cultivated with Dwarf Cashew Grafted Early; Embrapa Tropical Agroindustry: Fortaleza, Brazil, 2000; p. 11. [Google Scholar]
- Ferreira, G.W.; Bordallo, S.U.; Meyer, E.; Duarte, Z.V.S.; Schmitt, J.K.; Garlet, L.P.; da Silva, A.A.K.; Moura-Bueno, J.M.; de Melo, G.W.B.; Brunetto, G.; et al. Heavy Metal-Based Fungicides Alter the Chemical Fractions of Cu, Zn, and Mn in Vineyards in Southern Brazil. Agronomy 2024, 14, 969. [Google Scholar] [CrossRef] [Scilit]
- Fonseca, N.; Borges, A.L. Liming and fertilization for mango. In Recommendations for Liming and Fertilization for Pineapple, Acerola, Banana, Citrus, Papaya, Cassava, Mango, and Passion Fruit; Borges, A.L., Ed.; Embrapa: Brasília, Brazil, 2021; pp. 225–242. [Google Scholar]
- Viscarra Rossel, R.A.; Behrens, T.; Ben-Dor, E.; Brown, D.J.; Demattê, J.A.M.; Shepherd, K.D.; Shi, Z.; Stenberg, B.; Stevens, A.; Adamchuk, V.; et al. A global spectral library to characterize the world’s soil. Earth-Sci. Rev. 2016, 155, 198–230. [Google Scholar] [CrossRef] [Scilit]






| Nutrient | Minimum | Mean | Maximum | Standard Deviation (SD) |
|---|---|---|---|---|
| N (g kg−1) | 9.00 | 25.67 | 42.00 | 6.91 |
| P (g kg−1) | 0.64 | 1.79 | 3.34 | 0.30 |
| K (g kg−1) | 1.92 | 24.81 | 42.00 | 6.72 |
| Ca (g kg−1) | 2.00 | 6.21 | 31.00 | 3.91 |
| Mg (g kg−1) | 0.98 | 2.50 | 5.88 | 0.74 |
| S (g kg−1) | 0.09 | 1.59 | 3.13 | 0.37 |
| Cu (mg kg−1) | 0.00 | 5.90 | 34.00 | 3.75 |
| Zn (mg kg−1) | 0.11 | 14.53 | 47.00 | 5.17 |
| Fe (mg kg−1) | 12.80 | 76.68 | 263.00 | 26.73 |
| Mn (mg kg−1) | 18.00 | 265.89 | 745.00 | 161.20 |
| B (mg kg−1) | 1.21 | 14.41 | 48.00 | 7.84 |
| Nutrient | Minimum | Mean | Maximum | Standard Deviation (SD) |
|---|---|---|---|---|
| N (g kg−1) | 9.24 | 14.03 | 26.40 | 3.94 |
| P (g kg−1) | 0.63 | 1.87 | 4.51 | 0.91 |
| K (g kg−1) | 5.04 | 9.87 | 18.48 | 1.66 |
| Ca (g kg−1) | 10.80 | 22.65 | 46.50 | 4.37 |
| Mg (g kg−1) | 0.60 | 2.16 | 5.80 | 0.48 |
| S (g kg−1) | 0.15 | 1.29 | 1.81 | 0.28 |
| Cu (mg kg−1) | 4.33 | 18.49 | 72.00 | 1.657 |
| Zn (mg kg−1) | 9.93 | 23.80 | 106.37 | 8.24 |
| Fe (mg kg−1) | 25.00 | 58.62 | 123.39 | 18.39 |
| Mn (mg kg−1) | 79.08 | 400.262 | 992.06 | 222.98 |
| B (mg kg−1) | 4.34 | 37.77 | 100.45 | 14.99 |
| Nutrient | Minimum | Mean | Maximum | Standard Deviation (SD) |
|---|---|---|---|---|
| N (g kg−1) | 11.37 | 25.35 | 42.20 | 2.52 |
| P (g kg−1) | 1.10 | 5.11 | 14.00 | 3.19 |
| K (g kg−1) | 5.41 | 11.82 | 23.37 | 3.16 |
| Ca (g kg−1) | 3.20 | 19.23 | 50.18 | 11.79 |
| Mg (g kg−1) | 1.10 | 2.77 | 6.13 | 1.07 |
| B (mg kg−1) | 12.52 | 28.95 | 78.5 | 13.27 |
| Cu (mg kg−1) | 1.44 | 13.22 | 38.21 | 6.25 |
| Zn (mg kg−1) | 18.30 | 54.58 | 137.30 | 28.54 |
| Fe (mg kg−1) | 35.95 | 125.15 | 235.00 | 35.05 |
| Nutrients | Nitroperchloric and Sulfuric Chemical Digestion | Vis-NIR Models | ||||
|---|---|---|---|---|---|---|
| Insufficient | Normal | Excessive | Insufficient | Normal | Excessive | |
| N | 40% | 51% | 9% | 42% | 54% | 4% |
| P | 43% | 40% | 17% | 34% | 52% | 13% |
| K | 71% | 28% | 1% | 73% | 27% | 0% |
| Ca | 1% | 95% | 4% | 1% | 95% | 4% |
| Mg | 29% | 70% | 1% | 32% | 68% | 0% |
| S | 73% | 25% | 2% | 59% | 39% | 2% |
| Mn | 46% | 54% | 0% | 47% | 49% | 5% |
| Fe | 66% | 33% | 1% | 61% | 38% | 1% |
| Cu | 60% | 38% | 2% | 76% | 24% | 0% |
| Zn | 38% | 60% | 2% | 46% | 50% | 0% |
| B | 27% | 64% | 9% | 20% | 72% | 8% |
| Nutrients | Nitroperchloric and Sulfuric Chemical Digestion | Vis-NIR Models | ||||
|---|---|---|---|---|---|---|
| Insufficient | Normal | Excessive | Insufficient | Normal | Excessive | |
| N | 4% | 95% | 1% | 3% | 97% | 0% |
| P | 1% | 62% | 36% | 0% | 57% | 43% |
| K | 0% | 64% | 36% | 0% | 69% | 31% |
| Ca | 19% | 75% | 1% | 15% | 82% | 3% |
| Mg | 90% | 0% | 10% | 58% | 22% | 0% |
| S | 3% | 92% | 6% | 6% | 25% | 69% |
| Mn | 0% | 1% | 99% | 3% | 6% | 92% |
| Fe | 40% | 50% | 10% | 31% | 69% | 0% |
| Cu | 39% | 32% | 29% | 36% | 40% | 24% |
| Zn | 29% | 54% | 3% | 24% | 50% | 3% |
| B | 90% | 10% | 1% | 87% | 8% | 0% |
| Nutrients | Nitroperchloric and Sulfuric Chemical Digestion | Vis-NIR Models | ||||
|---|---|---|---|---|---|---|
| Insufficient | Normal | Excessive | Insufficient | Normal | Excessive | |
| N | 1% | 59% | 40% | 1% | 55% | 44% |
| P | 0% | 46% | 53% | 3% | 37% | 60% |
| K | 10% | 75% | 15% | 10% | 78% | 2% |
| Ca | 63% | 11% | 26% | 56% | 18% | 26% |
| Mg | 30% | 59% | 1% | 29% | 71% | 0% |
| Fe | 1% | 82% | 17% | 0% | 75% | 25% |
| Cu | - | - | - | - | - | - |
| Zn | 7% | 48% | 44% | 11% | 40% | 49% |
| B | 42% | 56% | 1% | 41% | 59% | 0% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 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.
Share and Cite
Miranda Corrêa, A.; Michel Moura-Bueno, J.; Augusto Marconato, C.; da Silva Santos, M.; Marchezan, C.; Grando, D.L.; Tassinari, A.; Natale, W.; Eduardo Rozane, D.; Brunetto, G. Combining Machine Learning and Vis-NIR Spectroscopy to Estimate Nutrients in Fruit Tree Leaves. Horticulturae 2026, 12, 108. https://doi.org/10.3390/horticulturae12010108
Miranda Corrêa A, Michel Moura-Bueno J, Augusto Marconato C, da Silva Santos M, Marchezan C, Grando DL, Tassinari A, Natale W, Eduardo Rozane D, Brunetto G. Combining Machine Learning and Vis-NIR Spectroscopy to Estimate Nutrients in Fruit Tree Leaves. Horticulturae. 2026; 12(1):108. https://doi.org/10.3390/horticulturae12010108
Chicago/Turabian StyleMiranda Corrêa, Aparecida, Jean Michel Moura-Bueno, Carlos Augusto Marconato, Micael da Silva Santos, Carina Marchezan, Douglas Luiz Grando, Adriele Tassinari, William Natale, Danilo Eduardo Rozane, and Gustavo Brunetto. 2026. "Combining Machine Learning and Vis-NIR Spectroscopy to Estimate Nutrients in Fruit Tree Leaves" Horticulturae 12, no. 1: 108. https://doi.org/10.3390/horticulturae12010108
APA StyleMiranda Corrêa, A., Michel Moura-Bueno, J., Augusto Marconato, C., da Silva Santos, M., Marchezan, C., Grando, D. L., Tassinari, A., Natale, W., Eduardo Rozane, D., & Brunetto, G. (2026). Combining Machine Learning and Vis-NIR Spectroscopy to Estimate Nutrients in Fruit Tree Leaves. Horticulturae, 12(1), 108. https://doi.org/10.3390/horticulturae12010108

