Hyperspectral inversion of soil total nitrogen content using spectral and machine learning

Authors

  • Zhenyu Dong State Key Laboratory of Water Engineering Ecology and Environment in Arid Region, Xi’an University of technology, Xi’an, 710048, China
  • Ni Wang State Key Laboratory of Water Engineering Ecology and Environment in Arid Region, Xi’an University of technology, Xi’an, 710048, China
  • Jiancang Xie State Key Laboratory of Water Engineering Ecology and Environment in Arid Region, Xi’an University of technology, Xi’an, 710048, China
  • Jungang Luo State Key Laboratory of Water Engineering Ecology and Environment in Arid Region, Xi’an University of technology, Xi’an, 710048, China

Keywords:

Soil Total Nitrogen, Hyperspectral, Machine Learning, Feature Extraction, Random Forest, Agro-pastoral Transitional zone

Abstract

The Agro-pastoral Transitional Ecotone of Northern Shaanxi is an ecologically fragile region. Soil nitrogen is a critical factor influencing crop productivity and regional ecological balance. Rapid and accurate monitoring of farmland soil total nitrogen (TN) content is therefore essential for implementing precision agriculture and ensuring sustainable land use in this area. This study focused on the cultivated soils of Dingbian County, a representative area within this ecotone. Field-collected soil samples underwent TN content determination and laboratory-based hyper spectral reflectance measurement. The original spectral reflectance (R) was first transformed using mathematical methods, including first-derivative (FDR), second-derivative (SDR), and logarithm of the reciprocal's first-derivative (LRFD) analysis, to enhance spectral information and suppress background noise. Subsequently, the successive projections algorithm (SPA) and correlation analysis (CA) were integrated to identify feature wavelengths highly correlated with soil TN from the transformed spectral data. Partial Least Squares Regression (PLSR), Decision Tree (DT), and Random Forest (RF) were developed to estimate soil TN content. Model performance was evaluated and compared using the coefficient of determination (R²), root mean square error (RMSE), and ratio of performance to deviation (RPD). The results indicated that: (1) Spectral derivative transformations effectively highlighted subtle information, with LRFD showing the greatest sensitivity to TN. Models built using LRFD-derived features consistently outperformed those based on original reflectance. (2) Among the machine learning algorithms, the Random Forest (RF) model demonstrated superior predictive performance on the validation set (R² = 0.85, RMSE = 0.11 g/kg, RPD = 2.15), indicating the highest stability and generalization capability. The PLSR model performed moderately well, while the DT model was prone to over fitting and yielded the lowest accuracy. (3) This study confirms that the integration of hyper spectral technology and machine learning algorithms enables efficient and precise estimation of soil TN content in farmland within the Northern Shaanxi agro-pastoral ecotone, providing a reliable technical framework for soil fertility assessment and precision nutrient management in the region.

Bangladesh J. Bot. 55(3): 605-614, 2026 (September)

Abstract
43
PDF
32

Downloads

Published

2026-09-30

Issue

Section

Articles

How to Cite

Dong, Z. ., Wang, N. ., Xie, J. ., & Luo, J. . (2026). Hyperspectral inversion of soil total nitrogen content using spectral and machine learning. Bangladesh Journal of Botany, 55(3), 605-614. https://doi.org/10.3329/bjb.v55i3.93850