## 5 Conclusions  
This study demonstrates that utilizing a multilayer denoising autoencoder to extract important features from spectra and using them as inputs to ensemble learning models plays a beneficial role in the inversion of total phosphorus in water from remote sensing data, leading to improved model inversion performance. The powerful learning capability of the multilayer denoising autoencoder enables effective denoising of raw data, retaining only relevant spectral information while reducing the dimensionality of the input data. This helps to prevent overfitting of the model and enhances its generalization capability. Additionally, incorporating time information into the model's input data facilitates capturing seasonal variations in water quality, learning the correlation between water quality and seasons, thereby improving the inversion accuracy of the model. The results indicated that the bagging model, by integrating multiple different models, mitigates the prediction bias of individual models, resulting in higher inversion accuracy and smaller errors compared to the other three methods. This indicates that bagging ensemble learning models have broad application prospects for water quality inversion of non-optically active substances using remote sensing data. The linear regression model performed the worst, indicating that total phosphorus, as a non-optically active substance, has a nonlinear relationship with the spectra, which linear regression fails to capture effectively. This also confirms the advantage of the bagging model in capturing nonlinear relationships. Overall, the comprehensive framework proposed in this study, based on the multilayer denoising autoencoder for water quality inversion, provided technical support for applying remote sensing data to basin-wide water quality monitoring, which is of significant importance for relevant departments to conduct water environmental quality monitoring quickly and efficiently.  
Conceptualization, Z.S.; methodology, Z.S.; software, Z.S.; validation, Z.S., Y.Z. ([PERSON]), L.G., Y.L., Z.T., S.L. and Y.Z. ([PERSON]); formal analysis, Z.S., Y.Z. ([PERSON]), L.G., Y.L., Z.T., S.L. and Y.Z. ([PERSON]); investigation, Z.S., Z.T., Y.Z. ([PERSON]) and L.G.; resources, Y.Z. ([PERSON]), L.G., S.L. and Y.L.; data curation, Z.S. and Z.T.; writing--original draft preparation, Z.S.; writing--review and editing, Z.S., Y.Z. ([PERSON]), Z.T. and L.G.; visualization, Z.S.; supervision, Z.S., Y.Z. ([PERSON]) and L.G.; project administration, Y.L. and L.G.; funding acquisition, Y.L. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Research on Risk Perception and Multi-Body Co-Creation of Water Ecology and Environment in Songhua River Basin, grant number No. HST2023S006.  
Dataset available on request from the authors.  
Special thanks to the European Space Agency for providing Sentinel-2 remote sensing data and to the National Surface Water Automatic Monitoring website for providing water quality data.  
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.