SciELO - Scientific Electronic Library Online

vol.44 issue2Grazing intensity and nitrogen fertilization on the height variation of ryegrass (Lolium multiflorumLam.) in integrated crop-livestock systems.Production costs of teak (Tectona grandis) and melina (Gmelina arborea) in silvopastoral systems in the northern region of Costa Rica author indexsubject indexarticles search
Home Pagealphabetic serial listing  

Services on Demand




Related links

  • Have no similar articlesSimilars in SciELO


Agronomía Costarricense

Print version ISSN 0377-9424


PERRET, Johan et al. Development of spectroscopic methods and machine learning algorithms for evaluation of some soil properties in Costa Rica. Agron. Costarricense [online]. 2020, vol.44, n.2, pp.139-154. ISSN 0377-9424.


Conventional laboratory methods to analyze soil nutrients are usually time-consuming and costly. On the other hand, the visible and infrared spectroscopy offers a rapid technique to characterize soils. The spectral signatures encode information about the inherent composition of the soil, which comprises mineral composition, nutrient content, organic compounds and water.


The main objective of this study was to build spectral libraries for the tropical soils of Costa Rica and to determine the optimal hyperspectral wave bands in the visible and near infrared and shortwave infrared to characterize soil properties in laboratory.

Materials and methods.

The hyperspectral measurements were carried out with an ASD FieldSpec 4 spectroradiometer to generate spectral reflectance signatures of more than 1300 soil samples from Costa Rica preprocessed at EARTH University’s soil laboratory. The nutrient content of each soil sample was determined by inductively coupled plasma. In addition, pH, exchangeable acidity, base saturation, acid saturation, effective cation exchange capacity, soil carbon, organic matter and soil texture were evaluated. Algorithms in MATLAB were developed to compile a hyperspectral data base and used a partial least squares regression (PLSR) methods to generate predictive models for these soil properties from hyperspectral signatures.


This spectroscopic approach combined with machine learning models allowed the identification of specific optimal wavebands in the spectral areas in which each nutrient can be predicted. An accurate estimation of the concentration of different components (Ca, Mg, Fe, C, N and CECe) was achieved with an R2 greater than 0,8 and a mean square error (RMSE) lower than 10%.


These spectroscopic technics combined with the PLS regression, can provide a very useful tool for precision agriculture in tropical soils of Costa Rica.

Keywords : Spectroradiometry; hyperspectral signatures; machine Learning; PLSR modeling; precision agriculture.

        · abstract in Spanish     · text in Spanish     · Spanish ( pdf )