MFRXG: A multi-feature stacking ensemble RF-XGBoost model for total nitrogen retrieval in the Yellow River from Landsat 8/9 data
Total nitrogen (TN) is a key indicator for assessing eutrophication in aquatic systems, and its concentration dynamics are influenced by a combination of hydrometeorological factors, terrain, and other pollution sources. However, traditional retrieval models based solely on remote sensing reflectance often suffer from limited generalization capability. This study develops a multi-feature stacked random forest (RF)-extreme gradient boosting (XGBoost) algorithm (MFRXG) based on field TN data from automatic stations along the Yellow River (YR). The MFRXG integrates Landsat 8/9 satellite data, ERA5 hydrometeorological data, and terrain data to estimate the TN concentration in YR. Using an independent validation dataset in 2025, MFRXG demonstrates robust prediction accuracy and stability, with a coefficient of determination (R 2 ) of 0.75, a root mean square error (RMSE) of 0.53 mg/L, and a mean absolute error (MAE) of 0.31 mg/L, outperforming multiple linear regression (MLR), support vector regression (SVR), artificial neural networks (ANN), RF, and XGBoost. Subsequently, the spatiotemporal changes of TN concentration in YR are investigated from 2015 to 2025. Results show that spatially, TN concentrations exhibit a fluctuating pattern with a generally increasing gradient from the upstream to the downstream of the YR. Temporally, over the past decade, TN concentrations along the main stream show an overall slight upward trend, which is primarily attributable to changes in concentration contributions from upstream areas. Overall, the proposed modeling approach provides effective technical support for long-term and dynamic monitoring of TN concentration changes in YR and fills the gaps in spatial and temporal coverage and assessment efficiency of traditional monitoring methods.