Vis-NIR spectroscopy and machine learning for prediction of soil fertility indicators and fertilizer recommendation in Andean highland and rainforest agroecosystems

Resumen

This study evaluated the use of visible and near-infrared (Vis-NIR) spectroscopy combined with machine learning (ML) algorithms to predict soil fertility-related properties in two contrasting agroecological regions of Peru: the Highlands and the Rainforest. A total of 297 soil samples were analyzed using portable spectroradiometers covering a spectral range of 350–2500 nm, applying transformations such as Savitzky–Golay smoothing, first derivative, and band depth. Predictive models were developed using PLSR, Random Forest, Support Vector Machines, and neural networks. Results show variable predictive performance across soil properties and ecosystems. Organic matter in Highland soils and calcium in Rainforest soils achieved the strongest test-set accuracy (R2 > 0.70), while pH and texture fractions showed moderate performance (R2 = 0.42–0.67), and mobile nutrients including phosphorus, potassium, and sodium showed limited predictive accuracy due to their weak spectral expression. Spectral predictions were further integrated into a structured nutrient balance framework to assess agronomic reliability. Nitrogen fertilizer recommendations showed the strongest agreement between observed and predicted values across both ecosystems, whereas K2O and CaO recommendations in Highland soils were substantially underestimated, demonstrating that property-level statistical performance does not guarantee agronomic reliability. These findings confirm that Vis-NIR spectroscopy combined with ML represents a fast, cost-effective, and sustainable alternative to conventional soil analysis, especially in rural areas with limited laboratory infrastructure. Expanding regional calibration datasets and exploring mid-infrared FTIR spectroscopy as a complementary technology are identified as priority directions for improving predictions of agronomically critical nutrients.

Descripción

Citación

Pizarro, 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), Article 1331. https://doi.org/10.3390/rs18091331

Sede Central: Av. La Molina 1981 - La Molina. Lima. Perú - 15024

Central telefónica (511) 240-2100 / 240-2350

FacebookLa ReferenciaEurocris
Correo: repositorio@inia.gob.pe

© Instituto Nacional de Innovación Agraria - INIA