Machine Learning-Enhanced Ultraviolet-Visible Spectroscopy via Feature-Wavelength Optimization for Detection of Dimethylformamide (DMF) and m-Phenylenediamine (MPD)
Accurate monitoring of toxic solvents, specifically N, N-dimethylformamide (DMF) and m-phenylenediamine (MPD), in wastewater from reverse osmosis membrane manufacturing is essential. This study demonstrates that the performance of ultraviolet-visible spectroscopy can be significantly enhanced through a machine learning framework. The proposed framework follows a structured workflow comprising full-spectrum modeling, feature-wavelength optimization, and multi-algorithm collaboration. For feature extraction, successive projections algorithm (SPA), competitive adaptive reweighted sampling (CARS), and genetic algorithm (GA) were employed. Subsequently, multiple prediction models were constructed, including partial least squares regression (PLSR), support vector machine (SVM), least squares support vector machine (LSSVM), and random forest (RF). The results show that model suitability depends on the chemical properties of the analyte: for the strongly polar DMF, the GA-LSSVM model demonstrated superior performance, achieving a determination coefficient (R2) of 0.9993, a root mean square error (RMSE) of 0.7527 mg/L, and a mean absolute percentage error (MAPE) of 2.08% on the test set; for MPD, which contains a benzene ring, the SPA-PLSR model exhibited higher predictive ability, with an R2 of 0.9992, an RMSE of 0.9352 mg/L, and a MAPE of 1.64%. The independent verification using five standard solutions further confirmed the accuracy and practicality of the selected combination. This study confirms that models built upon 28–36 optimally selected feature wavelengths can achieve precise detection with an error margin below 2.5%, thereby providing key technical support for the online monitoring of DMF and MPD in industrial wastewater.
Authors
- Congjun Cao (ORCID: https://orcid.org/0000-0003-2574-5933)
- Minghui Wang (ORCID: https://orcid.org/0000-0003-4517-6782)
- Dan Feng Lu (ORCID: https://orcid.org/0000-0003-0714-5678)
- Pengfan ZHAN
- Zimeng Jin
- Mingyue Li
- Guoyong Yang
Institutions
- Xi'an University of Technology (CN)
- Advanced Research Projects Agency - Energy (US)
Publication Details
- Journal
- Analytical Letters
- Published
- 2026-07-23
- DOI
- https://doi.org/10.1080/00032719.2026.2707313
- Primary Topic
- Water Quality Monitoring and Analysis
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- National Natural Science Foundation of China