Evaluation of Soil Nutrient Status Based on LightGBM Model: An Example of Tobacco Planting Soil in Debao County, Guangxi

Soil nutrient status is the foundation of agricultural development. Exploring the features of soil nutrients and status evaluation can provide a reference for the development of modern agriculture. LightGBM is an optimization algorithm based on the boosting framework, which uses histograms to improve the accuracy of the model. Based on the construction of the LightGBM model, the main nutrient features and status of tobacco planting soil were analyzed in seven towns in Debao County, Guangxi Province, namely Yantong Town, Longguang Town, Najia Town, Zurong Town, Du’an Town, Dongling Town and Jingde Town. The confusion matrix results show the accuracy of the LightGBM model is 94.2%, and the eigenvalue analysis shows that the available potassium (K) contributes the most to the nutrient status. The pH value of soil ranging from 6.1 to 7.8 is favorable for tobacco growth, and the contents of soil organic matter, total nitrogen (N), available phosphorus (P), exchangeable calcium (Ca) and exchangeable magnesium (Mg) are at the appropriate level. Available potassium (K) and available zinc (Zn) are at a high level, but available boron (B) is slightly insufficient. The nutrient status of 10% of soil is at an extremely high level, and about 81.03% of soil is medium level or above. The LightGBM model has high reliability in the automatic evaluation of soil nutrient status, which not only can accurately monitor the soil nutrient status but also reflects the correlation and importance of nutrient factors. Therefore, the LightGBM model is significant for guiding soil cultivation and agricultural production.