Background: Accurate and timely estimation of nitrogen nutrition index (NNI) is critical for assessing crop nitrogen (N) status and implementing precision N management. While machine learning (ML) techniques combined with unmanned aerial vehicle (UAV) remote sensing have been increasingly utilized, their performance across different agricultural conditions is often influenced by weather, soil properties, and field practices. Effectively integrating these variables within an ensemble ML model is therefore essential for reliable cross-stage N diagnosis. In this study, a stacking ensemble learning framework was developed to enhance the estimation accuracy of rice NNI across multiple growth stages by integrating multi-source data, including UAV-derived vegetation indices (VIs), meteorological data, soil properties, and fertilization rates. These data were acquired from two field experiments involving different N treatments over two growing seasons and covering four key growth stages. Ten ML models were employed as base learners and their performance was systematically evaluated.
Results: Results showed that models relying solely on VIs exhibited limited accuracy and stability, whereas the inclusion of meteorological, soil, and fertilization data substantially improved NNI prediction. The performance of individual base ML models varied considerably across growth stages and input data combinations. The stacking ensemble model effectively integrated multi-source information and leveraged the strengths of base learners, consistently achieved superior prediction accuracy and robustness. It improved R² by 0.52–3.24% compared to the best base models across different growth stages, thereby strengthening the reliability of cross-stage NNI estimation. SHAP (SHapley Additive exPlanations) analysis further revealed the dynamic contributions of input features throughout the growing season, with VIs, soil properties, and fertilization rates played a dominant role in early to mid-stages, while climatic factors became more influential later.
Conclusion: This study confirms the significant potential of integrating multi-source data with ensemble learning for reliable NNI monitoring, providing a practical tool for supporting in-season N status diagnosis and precision fertilization management in rice production systems.
Supplementary Information: The online version contains supplementary material available at 10.1186/s12870-026-08602-x.
Keywords: Multi-source data; Nitrogen diagnosis; Rice; SHAP analysis; Stacking ensemble learning; UAV.