Vis-NIR Spectroscopy and Machine Learning for Prediction of Soil Fertility Indicators and Fertilizer Recommendation in Andean Highland and Rainforest Agroecosystems
Highlights
- Vis-NIR spectroscopy combined with machine learning reliably predicts stable soil properties (pH, organic matter, texture) and nitrogen recommendations, but performs poorly for mobile nutrients such as phosphorus, potassium, and sodium.
- Differences between agroecosystems (Andean highlands vs. central rainforest) are larger than discrepancies between observed and predicted values, highlighting the dominant role of ecological context in soil management and the limitations of relying solely on statistical metrics for fertilizer recommendations.
- Vis-NIR spectroscopy can be reliably applied for rapid assessment of stable soil properties and for supporting nitrogen management, but caution is needed when estimating mobile nutrients or deriving fertilizer recommendations directly.
- Agronomic decision-making frameworks should incorporate ecosystem-specific context and validation steps to avoid misleading recommendations based solely on statistical prediction metrics.
Abstract
1. Introduction
- (i)
- Which spectral features correlate with soil fertility-related and texture properties that are relevant to local farmers?
- (ii)
- What level of accuracy can different machine learning regression models achieve when estimating key soil fertility-related and texture properties from Vis-NIR spectra?
- (iii)
- To what extent can spectrally predicted soil properties be reliably integrated into a nutrient balance framework to generate consistent fertilizer recommendations across contrasting agroecological regions?
2. Materials and Methods
2.1. Methodological Workflow for Spectral Soil Analysis
2.2. Sampling Sites and Soil Laboratory Analyses
2.3. Soil Spectral Collection
2.4. Spectral Preprocessing
2.5. Variable Selection Method
2.6. Prediction Models
2.7. Modelling and Performance Assessment
2.8. Fertilizer Recommendation Framework
2.8.1. Crop Nutrient Demand
2.8.2. Soil Nutrient Supply
2.8.3. Fertilizer Dose Calculation
3. Results
3.1. Soil Physical and Chemical Characteristics
3.2. Normalized Weights of the Thematic Dimensions
3.3. Spectral Modelling Results Using Machine Learning
3.4. Fertilizer Recommendations
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Cotler, H.; Corona, J.A.; Mauricio Galeana-Pizaña, J. Erosión de Suelos y Carencia Alimentaria en México: Una Primera Aproximación. Investig. Geogr. 2020. [Google Scholar] [CrossRef]
- Tomczyk, P.; Wdowczyk, A.; Wiatkowska, B.; Szymańska-Pulikowska, A.; Kuriqi, A. Fertility and Quality of Arable Soils in Poland: Spatial–Temporal Analysis of Long-Term Monitoring. Ecol. Indic. 2024, 166, 112375. [Google Scholar] [CrossRef]
- Dupla, X.; Claustre, R.; Bonvin, E.; Graf, I.; Le Bayon, R.C.; Grand, S. Let the Dust Settle: Impact of Enhanced Rock Weathering on Soil Biological, Physical, and Geochemical Fertility. Sci. Total Environ. 2024, 954, 176297. [Google Scholar] [CrossRef]
- Barrera Mosquera, V.H.; Delgado, J.A.; Alwang, J.R.; Escudero López, L.O.; Cartagena Ayala, Y.E.; Domínguez Andrade, J.M.; D’adamo, R. Conservation Agriculture Increases Yields and Economic Returns of Potato, Forage, and Grain Systems of the Andes. Agron. J. 2019, 111, 2747–2753. [Google Scholar] [CrossRef]
- Glaser, B. Prehistorically Modified Soils of Central Amazonia: A Model for Sustainable Agriculture in the Twenty-First Century. Philos. Trans. R. Soc. B Biol. Sci. 2006, 362, 187–196. [Google Scholar] [CrossRef]
- Barra, I.; Haefele, S.M.; Sakrabani, R.; Kebede, F. Soil Spectroscopy with the Use of Chemometrics, Machine Learning and Pre-Processing Techniques in Soil Diagnosis: Recent Advances—A Review. TrAC Trends Anal. Chem. 2021, 135, 116166. [Google Scholar] [CrossRef]
- Lucas, Y.; Santin, R.C.; da Silva, W.T.L.; Merdy, P.; Melfi, A.J.; Pereira, O.J.R.; Montes, C.R. Soil Sample Conservation from Field to Lab for Heterotrophic Respiration Assessment. Methods X 2020, 7, 101039. [Google Scholar] [CrossRef] [PubMed]
- Ahmadi, A.; Emami, M.; Daccache, A.; He, L. Soil Properties Prediction for Precision Agriculture Using Visible and Near-Infrared Spectroscopy: A Systematic Review and Meta-Analysis. Agronomy 2021, 11, 433. [Google Scholar] [CrossRef]
- Demattê, J.A.M.; Paiva, A.F.d.S.; Poppiel, R.R.; Rosin, N.A.; Ruiz, L.F.C.; Mello, F.A.d.O.; Minasny, B.; Grunwald, S.; Ge, Y.; Ben Dor, E.; et al. The Brazilian Soil Spectral Service (BraSpecS): A User-Friendly System for Global Soil Spectra Communication. Remote Sens. 2022, 14, 740. [Google Scholar] [CrossRef]
- Viscarra Rossel, R.A.; Behrens, T.; Ben Dor, E.; Chabrillat, S.; Demattê, J.A.M.; Ge, Y.; Gomez, C.; Guerrero, C.; Peng, Y.; Ramirez-Lopez, L.; et al. Diffuse Reflectance Spectroscopy for Estimating Soil Properties: A Technology for the 21st Century. Eur. J. Soil Sci. 2022, 73, e13271. [Google Scholar] [CrossRef]
- Piccini, C.; Metzger, K.; Debaene, G.; Stenberg, B.; Götzinger, S.; Borůvka, L.; Sandén, T.; Bragazza, L.; Liebisch, F. In-Field Soil Spectroscopy in Vis–NIR Range for Fast and Reliable Soil Analysis: A Review. Eur. J. Soil Sci. 2024, 75, e13481. [Google Scholar] [CrossRef]
- Ramirez-Lopez, L.; Wadoux, A.M.J.C.; Franceschini, M.H.D.; Terra, F.S.; Marques, K.P.P.; Sayão, V.M.; Demattê, J.A.M. Robust Soil Mapping at the Farm Scale with Vis–NIR Spectroscopy. Eur. J. Soil Sci. 2019, 70, 378–393. [Google Scholar] [CrossRef]
- Rodríguez-Pérez, J.R.; Marcelo, V.; Pereira-Obaya, D.; García-Fernández, M.; Sanz-Ablanedo, E. Estimating Soil Properties and Nutrients by Visible and Infrared Diffuse Reflectance Spectroscopy to Characterize Vineyards. Agronomy 2021, 11, 1895. [Google Scholar] [CrossRef]
- Wijewardane, N.K.; Hetrick, S.; Ackerson, J.; Morgan, C.L.S.; Ge, Y. VisNIR Integrated Multi-Sensing Penetrometer for in Situ High-Resolution Vertical Soil Sensing. Soil Tillage Res. 2020, 199, 104604. [Google Scholar] [CrossRef]
- Najdenko, E.; Lorenz, F.; Dittert, K.; Olfs, H.W. Rapid In-Field Soil Analysis of Plant-Available Nutrients and PH for Precision Agriculture—A Review. Precis. Agric. 2024, 25, 3189–3218. [Google Scholar] [CrossRef]
- Salazar, O.; Benvenuto, A.; Fajardo, M.; Fuentes, J.P.; Nájera, F.; Celedón, A.; Pfeiffer, M.; Renwick, L.L.R.; Seguel, O.; Tapia, Y.; et al. Evaluation of a Miniaturized Portable NIR Spectrometer for the Prediction of Soil Properties in Mediterranean Central Chile. Geoderma Reg. 2023, 34, e00675. [Google Scholar] [CrossRef]
- Ng, W.; Husnain; Anggria, L.; Siregar, A.F.; Hartatik, W.; Sulaeman, Y.; Jones, E.; Minasny, B. Developing a Soil Spectral Library Using a Low-Cost NIR Spectrometer for Precision Fertilization in Indonesia. Geoderma Reg. 2020, 22, e00319. [Google Scholar] [CrossRef]
- de Souza, M.F.; Franco, H.C.J.; Do Amaral, L.R. Estimation of Soil Phosphorus Availability via Visible and Near-Infrared Spectroscopy. Sci. Agric. 2019, 77, e20180295. [Google Scholar] [CrossRef]
- Ma, Y.; Minasny, B.; Demattê, J.A.M.; McBratney, A.B. Incorporating Soil Knowledge into Machine-Learning Prediction of Soil Properties from Soil Spectra. Eur. J. Soil Sci. 2023, 74, e13438. [Google Scholar] [CrossRef]
- Tepanosyan, G.; Muradyan, V.; Tepanosyan, G.; Avetisyan, R.; Asmaryan, S.; Sahakyan, L.; Denk, M.; Gläßer, C. Exploring Relationship of Soil PTE Geochemical and “VIS-NIR Spectroscopy” Patterns near Cu–Mo Mine (Armenia). Environ. Pollut. 2023, 323, 121180. [Google Scholar] [CrossRef]
- Wang, X.; Zhang, M.W.; Guo, Q.; Yang, H.L.; Wang, H.L.; Sun, X.L. Estimation of Soil Organic Matter by in Situ Vis-NIR Spectroscopy Using an Automatically Optimized Hybrid Model of Convolutional Neural Network and Long Short-Term Memory Network. Comput. Electron. Agric. 2023, 214, 108350. [Google Scholar] [CrossRef]
- Cevoli, C.; Iaccheri, E.; Fabbri, A.; Ragni, L. Data Fusion of FT-NIR Spectroscopy and Vis/NIR Hyperspectral Imaging to Predict Quality Parameters of Yellow Flesh “Jintao” Kiwifruit. Biosyst. Eng. 2024, 237, 157–169. [Google Scholar] [CrossRef]
- Munnaf, M.A.; Mouazen, A.M. Spectra Transfer Based Learning for Predicting and Classifying Soil Texture with Short-Ranged Vis-NIRS Sensor. Soil Tillage Res. 2023, 225, 105545. [Google Scholar] [CrossRef]
- Guerrero, C.; Wetterlind, J.; Stenberg, B.; Mouazen, A.M.; Gabarrón-Galeote, M.A.; Ruiz-Sinoga, J.D.; Zornoza, R.; Viscarra Rossel, R.A. Do We Really Need Large Spectral Libraries for Local Scale SOC Assessment with NIR Spectroscopy? Soil Tillage Res. 2016, 155, 501–509. [Google Scholar] [CrossRef]
- Díaz-Guadarrama, S.; Varón-Ramírez, V.M.; Lizarazo, I.; Guevara, M.; Angelini, M.; Araujo-Carrillo, G.A.; Argeñal, J.; Armas, D.; Balta, R.A.; Bolivar, A.; et al. Improving the Latin America and Caribbean Soil Information System (SISLAC) Database Enhances Its Usability and Scalability. Earth Syst. Sci. Data 2024, 16, 1229–1246. [Google Scholar] [CrossRef]
- Recena, R.; Fernández-Cabanás, V.M.; Delgado, A. Soil Fertility Assessment by Vis-NIR Spectroscopy: Predicting Soil Functioning Rather Than Availability Indices; FAO: Rome, Italy, 2018. [Google Scholar]
- Espinoza, R.; Molina, J.; Horn, M.J.; Gómez, M. Conceptos Bioclimáticos y su Aplicabilidad a la Zona Rural Altoandina: Caso Comunidad San Francisco de Raymina (Sfr)-Ayacucho. Technia 2015, 25, 5. [Google Scholar] [CrossRef]
- INEI. Territorio y Suelos. 2015. Available online: https://www.inei.gob.pe/media/MenuRecursivo/publicaciones_digitales/Est/Lib1342/cap01.pdf (accessed on 22 April 2026).
- Arce, A.; de Haan, S.; Juarez, H.; Burra, D.D.; Plasencia, F.; Ccanto, R.; Polreich, S.; Scurrah, M. The Spatial-Temporal Dynamics of Potato Agrobiodiversity in the Highlands of Central Peru: A Case Study of Smallholder Management across Farming Landscapes. Land 2019, 8, 169. [Google Scholar] [CrossRef]
- Ccopi, T.D.; Barzola, R.B.; Ruiz, S.S.; Gabriel, C.E.; Ortega, Q.K.; Cordova, B.F. River Flood Risk Assessment in Communities of the Peruvian Andes: A Semiquantitative Application for Disaster Prevention. Sustainability 2023, 15, 13768. [Google Scholar] [CrossRef]
- INRENA. Mapa de Suelos del Peru (1:5,000,000); Ministry of Agriculture, General Directorate of Water and Soils: Lima, Peru, 1996; Available online: https://es.scribd.com/document/422549685/Mapa-de-suelos-del-Peru (accessed on 22 April 2026).
- MINAGRI. Análisis de La Cadena Productiva del Cacao: Con Enfoque en Los Pequeños Productores de Limitado Acceso al Mercado, Gobierno del Perú. 2018. Available online: https://repositorio.midagri.gob.pe/handle/20.500.13036/66 (accessed on 22 April 2026).
- Walkley, A.; Black, I.A. An Examination of the Degtjareff Method for Determining Soil Organic Matter and a Proposed Modification of the Chromic Acid Titration Method. Soil Sci. 1934, 37, 29–38. [Google Scholar] [CrossRef]
- Barra, I.; Briak, H.; Kebede, F. The Application of Statistical Preprocessing on Spectral Data Does Not Always Guarantee the Improvement of the Predictive Quality of Multivariate Models: Case of Soil Spectroscopy Applied to Moroccan Soils. Vib. Spectrosc. 2022, 121, 103409. [Google Scholar] [CrossRef]
- Ben-Dor, E.; Chabrillat, S.; Demattê, J.A.M.; Taylor, G.R.; Hill, J.; Whiting, M.L.; Sommer, S. Using Imaging Spectroscopy to Study Soil Properties. Remote Sens. Environ. 2009, 113, S38–S55. [Google Scholar] [CrossRef]
- Lukas, M.; Lehnert, W. Package “hsdar” Type Package Title Manage, Analyse and Simulate Hyperspectral Data; CRAN: Vienna, Austria, 2017. [Google Scholar]
- Stenberg, B.; Viscarra Rossel, R.A.; Mouazen, A.M.; Wetterlind, J. Visible and Near Infrared Spectroscopy in Soil Science. Adv. Agron. 2010, 107, 163–215. [Google Scholar] [CrossRef]
- Tian, J.; Philpot, W.D. Relationship between Surface Soil Water Content, Evaporation Rate, and Water Absorption Band Depths in SWIR Reflectance Spectra. Remote Sens. Environ. 2015, 169, 280–289. [Google Scholar] [CrossRef]
- Araújo, M.C.U.; Saldanha, T.C.B.; Galvão, R.K.H.; Yoneyama, T.; Chame, H.C.; Visani, V. The Successive Projections Algorithm for Variable Selection in Spectroscopic Multicomponent Analysis. Chemom. Intell. Lab. Syst. 2001, 57, 65–73. [Google Scholar] [CrossRef]
- 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]
- Viscarra Rossel, R.A.; Walvoort, D.J.J.; McBratney, A.B.; Janik, L.J.; Skjemstad, J.O. Visible, near Infrared, Mid Infrared or Combined Diffuse Reflectance Spectroscopy for Simultaneous Assessment of Various Soil Properties. Geoderma 2006, 131, 59–75. [Google Scholar] [CrossRef]
- Zhao, G.; Liu, M.; Shi, P.; Zong, N.; Wang, J.; Wu, J.; Zhang, X. Spatial-Temporal Variation of ANPP and Rain-Use Efficiency along a Precipitation Gradient on Changtang Plateau, Tibet. Remote Sens. 2019, 11, 325. [Google Scholar] [CrossRef]
- Chang, R.L.; Nithiyanantham, S.; Huang, C.Y.; Pai, P.Y.; Chang, T.T.; Hu, L.C.; Chen, R.J.; VijayaPadma, V.; Kuo, W.W.; Huang, C.Y. Synergistic Cardiac Pathological Hypertrophy Induced by High-Salt Diet in IGF-IIRα Cardiac-Specific Transgenic Rats. PLoS ONE 2019, 14, e0216285. [Google Scholar] [CrossRef] [PubMed]
- Yang, X.M.; Feng, Q.; Zhu, M. Vegetation Characteristics and Soil Properties of Artificially Remediated Grasslands: The Case Study of the Shimenhe Mining Area in Qilian Mountains, Northwest China. Res. Cold Arid. Reg. 2024, 16, 9. [Google Scholar] [CrossRef]
- Lyu, X.; Li, M.; Li, X.; Li, S.; Yan, C.; Ma, C.; Gong, Z. Assessing the Systematic Effects of the Concentration of Nitrogen Supplied to Dual-Root Systems of Soybean Plants on Nodulation and Nitrogen Fixation. Agronomy 2020, 10, 763. [Google Scholar] [CrossRef]
- Kostrzewski, M.; Melnik, R. Condition Monitoring of Rail Transport Systems: A Bibliometric Performance Analysis and Systematic Literature Review. Sensors 2021, 21, 4710. [Google Scholar] [CrossRef]
- Chai, T.; Draxler, R.R. Root Mean Square Error (RMSE) or Mean Absolute Error (MAE)? Arguments against Avoiding RMSE in the Literature. Geosci. Model Dev. 2014, 7, 1247–1250. [Google Scholar] [CrossRef]
- Chang, C.-W.; Laird, D.A.; Mausbach, M.J.; Hurburgh, C.R. Near-Infrared Reflectance Spectroscopy–Principal Components Regression Analyses of Soil Properties. Soil Sci. Soc. Am. J. 2001, 65, 480–490. [Google Scholar] [CrossRef]
- Canero, F.M.; Rodriguez-galiano, V.; Aragones, D. Heliyon Machine Learning and Feature Selection for Soil Spectroscopy. An Evaluation of Random Forest Wrappers to Predict Soil Organic Matter, Clay, and Carbonates. Heliyon 2024, 10, e30228. [Google Scholar] [CrossRef]
- Kvalseth, T.O. Cautionary Note about R2. Am. Stat. 1985, 39, 279–285. [Google Scholar] [CrossRef]
- Nuzzo, R. Percent Differences: Another Look. PM&R 2018, 10, 661–664. [Google Scholar] [CrossRef]
- Capetillo-Burela, A.; López-Collado, C.J.; Zetina-Lezama, R.; Reynolds-Chávez, M.A.; Matilde-Hernández, C.; Cadena-Zapata, M.; López-López, J.A. Modelo Conceptual de Fertilización Nitrogenada Para Maiz (Zea mays L.) En Veracruz, México. Rev. Iberoam. Bioecon. Cambio Clim. 2021, 7, 1617–1631. [Google Scholar] [CrossRef]
- Burt, R. Soil Survey Laboratory Methods Manual. 2004. Available online: https://www.govinfo.gov/content/pkg/GOVPUB-A57-PURL-gpo93947/pdf/GOVPUB-A57-PURL-gpo93947.pdf (accessed on 9 September 2025).
- INIA INDIA. Disponibilidad de Semilla Dirección General de Proyección y Servicios Agrarios Unidad de Medios y Comunicación Técnica, Huancayo. 2004. Available online: https://www.inia.gob.pe/disponibilidad-de-semillas/ (accessed on 22 April 2026).
- MIDAGRI (Ministerio de Desarrollo Agrario y Riego). Manual de Producción de Maíz Amiláceo; Platforma del Estado Peruano: Lima, Peru, 2020. [Google Scholar]
- Maiti, D.; Das, D.K.; Pathak, H. Simulation of Fertilizer Requirement for Irrigated Wheat in Eastern India Using the QUEFTS Model. Sci. World J. 2006, 6, 231–245. [Google Scholar] [CrossRef] [PubMed]
- Rawls, W.J.; Nemes, A.; Pachepsky, Y. Effect of Soil Organic Carbon on Soil Hydraulic Properties. In Development of Pedotransfer Functions in Soil Hydrology; Elsevier: Amsterdam, The Netherlands, 2004; pp. 95–114. [Google Scholar]
- Manrique, L.A.; Jones, C.A. Bulk Density of Soils in Relation to Soil Physical and Chemical Properties. Soil Sci. Soc. Am. J. 1991, 55, 476. [Google Scholar] [CrossRef]
- Bernoux, M.; Cerri, C.; Arrouays, D.; Jolivet, C.; Volkoff, B. Bulk Densities of Brazilian Amazon Soils Related to Other Soil Properties. Soil Sci. Soc. Am. J. 1998, 62, 743–749. [Google Scholar] [CrossRef]
- Raun, W.R.; Johnson, G.V. Improving Nitrogen Use Efficiency for Cereal Production. Agron. J. 1999, 91, 357–363. [Google Scholar] [CrossRef]
- Smil, V. Nitrogen in Crop Production: An Account of Global Flows. Glob. Biogeochem. Cycles 1999, 13, 647–662. [Google Scholar] [CrossRef]
- Rangaiah, K.M.; Nagaraju, B.; Shankaraiah, S.K.; Kasturappa, G.; Kadappa, B.P.; Sugatur Narayanaswamy, U.K.; Saqeebulla, M.; Dey, P. Enhancing Yield, Uptake and Nutrient Use Efficiency of Brinjal Through Soil Test Crop Response Approach. Commun. Soil Sci. Plant Anal. 2024, 55, 998–1014. [Google Scholar] [CrossRef]
- FAO. Una Introducción al Análisis de Suelo Utilizando Espectroscopía Visible e Infrarrojo Cercano (Vis-NIR) y Espectroscopía de Infrarrojo Medio (MIR); FAO: Rome, Italy, 2024. [Google Scholar]
- USDA. Soil Survey Manual Soil Science Division Staff Agriculture; USDA: Washington, DC, USA, 2017; 18p. [Google Scholar]
- Gallagher, N.B. Savitzky-Golay Smoothing and Differentiation Filter; Eigen Vector Inc.: Manson, WA, USA, 2020. [Google Scholar] [CrossRef]
- Shepherd, K.D.; Walsh, M.G. Development of Reflectance Spectral Libraries for Characterization of Soil Properties. Soil Sci. Soc. Am. J. 2002, 66, 988–998. [Google Scholar] [CrossRef]
- Safanelli, J.L.; Hengl, T.; Parente, L.L.; Minarik, R.; Bloom, D.E.; Todd-Brown, K.; Gholizadeh, A.; de Sousa Mendes, W.; Sanderman, J. Open Soil Spectral Library (OSSL): Building Reproducible Soil Calibration Models through Open Development and Community Engagement. PLoS ONE 2025, 20, e0296545. [Google Scholar] [CrossRef]
- Terhoeven-Urselmans, T.; Vagen, T.-G.; Spaargaren, O.; Shepherd, K.D. Prediction of Soil Fertility Properties from a Globally Distributed Soil Mid-Infrared Spectral Library. Soil Sci. Soc. Am. J. 2010, 74, 1792–1799. [Google Scholar] [CrossRef]
- Tavares, T.R.; Molin, J.P.; Nunes, L.C.; Alves, E.E.N.; Krug, F.J.; de Carvalho, H.W.P. Spectral Data of Tropical Soils Using Dry-Chemistry Techniques (VNIR, XRF, and LIBS): A Dataset for Soil Fertility Prediction. Data Brief. 2022, 41, 108004. [Google Scholar] [CrossRef]
- Du, C.; Zhou, J. Evaluation of Soil Fertility Using Infrared Spectroscopy: A Review. Environ. Chem. Lett. 2009, 7, 97–113. [Google Scholar] [CrossRef]
- Clingensmith, C.M.; Grunwald, S. Predicting Soil Properties and Interpreting Vis-NIR Models from across Continental United States. Sensors 2022, 22, 3187. [Google Scholar] [CrossRef] [PubMed]
- Vestergaard, R.-J.; Vasava, H.B.; Aspinall, D.; Chen, S.; Adamchuk, V.; Biswas, A. Evaluation of Optimized Preprocessing and Modeling Algorithms for Prediction of Soil Properties Using VIS-NIR Spectroscopy. Sensors 2021, 21, 20. [Google Scholar] [CrossRef] [PubMed]
- Neale, P.A.; Escher, B.I. In Vitro Bioassays to Assess Drinking Water Quality. Curr. Opin. Environ. Sci. Health 2019, 7, 1–7. [Google Scholar] [CrossRef]
- Mutanga, O.; Skidmore, A.K. Hyperspectral Band Depth Analysis for a Better Estimation of Grass Biomass (Cenchrus ciliaris) Measured under Controlled Laboratory Conditions. Int. J. Appl. Earth Obs. Geoinf. 2004, 5, 87–96. [Google Scholar] [CrossRef]
- Murad, M.O.F.; Jones, E.J.; Minasny, B.; McBratney, A.B.; Wijewardane, N.; Ge, Y. Assessing a VisNIR Penetrometer System for In-Situ Estimation of Soil Organic Carbon under Variable Soil Moisture Conditions. Biosyst. Eng. 2022, 224, 197–212. [Google Scholar] [CrossRef]
- Liu, Y.; Shen, L.; Zhu, X.; Xie, Y.; He, S. Spectral Data-Driven Prediction of Soil Properties Using LSTM-CNN-Attention Model. Appl. Sci. 2024, 14, 11687. [Google Scholar] [CrossRef]
- Zhou, W.; Li, C.; Zhao, W.; Stringer, L.C.; Fu, B. Spatial Distributions of Soil Nutrients Affected by Land Use, Topography and Their Interactions, in the Loess Plateau of China. Int. Soil Water Conserv. Res. 2024, 12, 227–239. [Google Scholar] [CrossRef]
- Kawamura, K.; Tsujimoto, Y.; Nishigaki, T.; Andriamananjara, A.; Rabenarivo, M.; Asai, H.; Rakotoson, T.; Razafimbelo, T. Laboratory Visible and Near-Infrared Spectroscopy with Genetic Algorithm-Based Partial Least Squares Regression for Assessing the Soil Phosphorus Content of Upland and Lowland Rice Fields in Madagascar. Remote Sens. 2019, 11, 506. [Google Scholar] [CrossRef]
- Shin, S.K.; Lee, S.J.; Park, J.H. Prediction of Soil Properties Using Vis-NIR Spectroscopy Combined with Machine Learning: A Review. Sensors 2025, 25, 5045. [Google Scholar] [CrossRef] [PubMed]
- Nawar, S.; Mouazen, A. Comparison between Random Forests, Artificial Neural Networks and Gradient Boosted Machines Methods of On-Line Vis-NIR Spectroscopy Measurements of Soil Total Nitrogen and Total Carbon. Sensors 2017, 17, 2428. [Google Scholar] [CrossRef]
- Ge, Y.; Morgan, C.L.S.; Grunwald, S.; Brown, D.J.; Sarkhot, D.V. Comparison of Soil Reflectance Spectra and Calibration Models Obtained Using Multiple Spectrometers. Geoderma 2011, 161, 202–211. [Google Scholar] [CrossRef]
- Lei, T.; Sun, D.-W. Achieving Joint Calibration of Soil Vis-NIR Spectra across Instruments, Soil Types and Properties by an Attention-Based Spectra Encoding-Spectra/Property Decoding Architecture. Geoderma 2022, 405, 115449. [Google Scholar] [CrossRef]
- Almeida Silva, F.H.C.; Wijewardane, N.K.; Cox, M.S.; Zhang, X. Assessment of Different VisNIR and MIR Spectroscopic Techniques and the Potential of Calibration Transfer between MIR Laboratory and Portable Instruments to Estimate Soil Properties. Soil Tillage Res. 2025, 251, 106555. [Google Scholar] [CrossRef]
- de Santana, F.B.; Otani, S.K.; de Souza, A.M.; Poppi, R.J. Comparison of PLS and SVM Models for Soil Organic Matter and Particle Size Using Vis-NIR Spectral Libraries. Geoderma Reg. 2021, 27, e00436. [Google Scholar] [CrossRef]
- Breure, T.S.; Webster, R.; Haefele, S.M.; Hannam, J.A.; Corstanje, R.; Milne, A.E. The Effect of Uncertainty in Predictions of Nutrient Concentrations from Soil Spectra on Variable-Rate Fertilizer Applications. Geoderma 2025, 462, 117504. [Google Scholar] [CrossRef]
- Breure, T.S.; Haefele, S.M.; Hannam, J.A.; Corstanje, R.; Webster, R.; Moreno-Rojas, S.; Milne, A.E. A Loss Function to Evaluate Agricultural Decision-Making under Uncertainty: A Case Study of Soil Spectroscopy. Precis. Agric. 2022, 23, 1333–1353. [Google Scholar] [CrossRef]
- Suárez-Rey, E.M.; Gallardo, M.; Romero-Gámez, M.; Giménez, C.; Rueda, F.J. Sensitivity and Uncertainty Analysis in Agro-Hydrological Modelling of Drip Fertigated Lettuce Crops under Mediterranean Conditions. Comput. Electron. Agric. 2019, 162, 630–650. [Google Scholar] [CrossRef]
- Metzger, K.; Liebisch, F.; Herrera, J.M.; Guillaume, T.; Walder, F.; Bragazza, L. The Use of Visible and Near-infrared Spectroscopy for In-situ Characterization of Agricultural Soil Fertility: A Proposition of Best Practice by Comparing Scanning Positions and Spectrometers. Soil Use Manag. 2024, 40, 12952. [Google Scholar] [CrossRef]
- Soriano-Disla, J.M.; Janik, L.J.; Viscarra Rossel, R.A.; Macdonald, L.M.; McLaughlin, M.J. The Performance of Visible, Near-, and Mid-Infrared Reflectance Spectroscopy for Prediction of Soil Physical, Chemical, and Biological Properties. Appl. Spectrosc. Rev. 2014, 49, 139–186. [Google Scholar] [CrossRef]
- Mokere, R.; Ghassan, M.; Barra, I. Soil Spectroscopy Improves Mid Infrared Soil Property Prediction through Optimized Preprocessing and Variable Selection. Front. Soil Sci. 2026, 6, 1760011. [Google Scholar] [CrossRef]









| Specification | FieldSpec® HandHeld | NeoSpectra Scanner |
|---|---|---|
| Spectral Range (nm) | 325–1075 | 1350–2500 (7400–4000 cm−1) |
| Sampling Interval (nm) | 1.5 | - |
| Spectral Resolution (FWHM) | 3.5 @ 700 nm | 16 nm @ 1550 nm |
| Signal-to-Noise Ratio (SNR) | - | >170:1 (Typical: 2000:1 at λ = 2350 nm, 2 s scan time) |
| Field of View/Sample Coverage | 25° | ~0.4 inch (~10 mm diameter) |
| Variable | Highlands | Rainforest | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Mean | Median | σ | Var | CV (%) | Mean | Median | σ | Var | CV (%) | |
| pH | 6.51 | 6.6 | 1.18 | 1.4 | 18.17 | 5.66 | 5.4 | 1 | 1 | 17.64 |
| EC (dS/m) | 7.76 | 5.22 | 14.72 | 216.78 | 189.71 | 3.51 | 3.06 | 2 | 4.01 | 56.99 |
| OM (%) | 4.14 | 3 | 3.17 | 10.07 | 76.64 | 2.44 | 2.3 | 1.3 | 1.69 | 53.3 |
| P (mg/kg) | 53.96 | 23.44 | 77.92 | 6071.67 | 144.41 | 22.96 | 17.22 | 23.35 | 545.04 | 101.69 |
| K (mg/kg) | 234.57 | 171.6 | 239.86 | 57,532.77 | 102.25 | 94.95 | 81.65 | 51.09 | 2610.54 | 53.81 |
| Ca (cmol/kg) | 19.82 | 13.63 | 17.15 | 294.04 | 86.5 | 9.42 | 7.51 | 8.58 | 73.6 | 91.09 |
| Mg (cmol/kg) | 2.62 | 2 | 2.28 | 5.18 | 86.82 | 2.07 | 1.17 | 3.13 | 9.82 | 151.16 |
| Na (cmol/kg) | 0.22 | 0.15 | 0.31 | 0.1 | 141.85 | 0.46 | 0.08 | 1.73 | 2.98 | 372.32 |
| Sand (%) | 51.82 | 51.52 | 15.2 | 231.04 | 29.33 | 34.52 | 31.8 | 15.52 | 240.77 | 44.95 |
| Silt (%) | 30.15 | 27.61 | 12.62 | 159.21 | 41.85 | 39.72 | 37.34 | 15 | 224.89 | 37.75 |
| Clay (%) | 18.03 | 18.16 | 9.77 | 95.54 | 54.2 | 25.76 | 25 | 9.77 | 95.46 | 37.93 |
| Highlands | Train | Test | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Input | Variable | Model | Hyperparameters | R2 | RMSE | RPD | R2 | RMSE | RPD |
| I-SG | pH | NN | size = 1, decay = 0.1 | 0.8004 | 0.5227 | 2.2472 | 0.4676 | 0.8912 | 1.3642 |
| 1D | EC | SVM | C = 1, gamma = 0.0375 | 0.5998 | 14.8001 | 1.154 | 0.0476 | 5.4214 | 1.0003 |
| I-SG | OM | NN | size = 1, decay = 0.1 | 0.8275 | 1.3439 | 2.4117 | 0.723 | 1.7351 | 1.7486 |
| 1D | P | NN | size = 1, decay = 0.0006 | 0.2017 | 70.4259 | 1.1238 | 0.2193 | 66.3275 | 1.139 |
| BD | K | RF | mtry = 2 | 0.9227 | 136.5559 | 1.9449 | 0.1326 | 154.3905 | 1.0266 |
| BD | Mg | SVM | C = 8, gamma = 0.0325 | 0.9288 | 0.7768 | 3.0938 | 0.3762 | 1.5414 | 1.2596 |
| I-SG | Na | RF | mtry = 2 | 0.9265 | 0.1057 | 1.9905 | 0.0174 | 0.4693 | 1.0182 |
| SG | Ca | PLSR | ncomp = 14 | 0.6491 | 9.4937 | 1.6953 | 0.5248 | 13.7029 | 1.4386 |
| 1D | Sand | SVM | C = 1, gamma = 0.0320 | 0.7212 | 8.534 | 1.8021 | 0.5511 | 10.0094 | 1.4886 |
| I-SG | Silt | SVM | C = 1, gamma = 0.0362 | 0.5573 | 9.2287 | 1.4492 | 0.165 | 9.6598 | 1.0938 |
| I-SG | Clay | RF | mtry = 2 | 0.9101 | 3.721 | 2.5241 | 0.4034 | 8.4303 | 1.2779 |
| Rainforest | Train | Test | |||||||
| Input | Variable | Model | Hyperparameters | R2 | RMSE | RPD | R2 | RMSE | RPD |
| BD | pH | NN | size = 1, decay = 0.1 | 0.7542 | 0.5127 | 2.0255 | 0.6206 | 0.568 | 1.5969 |
| SG | EC | PLSR | ncomp = 9 | 0.3643 | 1.6901 | 1.2611 | 0.2374 | 1.4789 | 1.113 |
| I-SG | OM | NN | size = 1, decay = 0.0422 | 0.1555 | 1.148 | 1.0941 | 0.1203 | 1.3137 | 1.079 |
| I-SG | P | RF | mtry = 2 | 0.8865 | 7.9101 | 2.1428 | 0.3987 | 29.8742 | 1.1673 |
| I-SG | K | PLSR | ncomp = 6 | 0.3385 | 41.551 | 1.2362 | 0.231 | 45.9359 | 1.1124 |
| 1D | Mg | RF | mtry = 2 | 0.9596 | 1.3951 | 2.3876 | 0.2761 | 2.2272 | 1.1651 |
| I-SG | Na | NN | size = 1, decay = 0.0422 | 0.6756 | 0.9826 | 1.7653 | 0.1801 | 2.1514 | 0.8044 |
| 1D | Ca | SVM | C = 2, gamma = 0.0297 | 0.8234 | 3.9176 | 2.2886 | 0.7921 | 3.5178 | 2.1577 |
| BD | Sand | RF | mtry = 20 | 0.9279 | 4.9101 | 3.0053 | 0.381 | 13.6315 | 1.2864 |
| BD | Silt | NN | mtry = 2 | 0.7111 | 8.1583 | 1.8705 | 0.6666 | 8.8376 | 1.6409 |
| 1D | Clay | PLSR | ncomp = 18 | 0.788 | 4.5914 | 2.1834 | 0.5552 | 6.3181 | 1.4587 |
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
Pizarro, S.; Ccopi, D.; Ortega, K.; Contreras, D.; Ñaupari, J.; Cano, D.; Patricio, S.; Loayza, H.; Apolo-Apolo, O.E. Vis-NIR Spectroscopy and Machine Learning for Prediction of Soil Fertility Indicators and Fertilizer Recommendation in Andean Highland and Rainforest Agroecosystems. Remote Sens. 2026, 18, 1331. https://doi.org/10.3390/rs18091331
Pizarro S, Ccopi D, Ortega K, Contreras D, Ñaupari J, Cano D, Patricio S, Loayza H, Apolo-Apolo OE. Vis-NIR Spectroscopy and Machine Learning for Prediction of Soil Fertility Indicators and Fertilizer Recommendation in Andean Highland and Rainforest Agroecosystems. Remote Sensing. 2026; 18(9):1331. https://doi.org/10.3390/rs18091331
Chicago/Turabian StylePizarro, Samuel, Dennis Ccopi, Kevin Ortega, Duglas Contreras, Javier Ñaupari, Deyvis Cano, Solanch Patricio, Hildo Loayza, and Orly Enrique Apolo-Apolo. 2026. "Vis-NIR Spectroscopy and Machine Learning for Prediction of Soil Fertility Indicators and Fertilizer Recommendation in Andean Highland and Rainforest Agroecosystems" Remote Sensing 18, no. 9: 1331. https://doi.org/10.3390/rs18091331
APA StylePizarro, S., Ccopi, D., Ortega, K., Contreras, D., Ñaupari, J., Cano, D., Patricio, S., Loayza, H., & Apolo-Apolo, O. E. (2026). Vis-NIR Spectroscopy and Machine Learning for Prediction of Soil Fertility Indicators and Fertilizer Recommendation in Andean Highland and Rainforest Agroecosystems. Remote Sensing, 18(9), 1331. https://doi.org/10.3390/rs18091331

