Abstract:
The total nitrogen (TN) content in soil represents a key indicator for evaluating soil quality. Its accurate detection holds great significance for scientific soil management and precision agriculture. However, existing studies on TN content prediction mostly depend on limited samples from small areas and fail to fully utilize deep learning techniques. These constraints hinder the accurate and efficient modeling of the TN distribution in soil over a large spatial scale. Using the hyperspectral soil data from the Open Soil Spectral Library (OSSL), this study systematically compared multiple combinations of different preprocessing, feature selection, and modeling strategies, exploring their applicability to accurate prediction of large-scale soil TNC. The experimental results show that the combination of standard normal variate (SNV), principal component analysis (PCA), and Transformer yielded a coefficient of determination (R
2) of 0.91 and a root mean square error (RMSE) of 1.08 g/kg on the test set. This combination exhibited greater robustness and generalizability, significantly outperforming conventional machine learning models such as random forest (RF) and extreme gradient boosting (XGBoost). Therefore, the SNV-PCA-Transformer combination offers a hyperspectral inversion method for rapid and effective TN content prediction, providing a feasible technical solution for high-accuracy and large-scale prediction of TN content in soil.