Related Experiment Video
Updated: Aug 25, 2025

Early Detection of Cyanobacterial Blooms and Associated Cyanotoxins using Fast Detection Strategy
Published on: February 25, 2021
A Virtual Sensing Concept for Nitrogen and Phosphorus Monitoring Using Machine Learning Techniques
Thulane Paepae1, Pitshou N Bokoro1, Kyandoghere Kyamakya2
1Department of Electrical and Electronic Engineering Technology, University of Johannesburg, Doornfontein 2028, South Africa.
Machine learning virtual sensors can predict nitrogen and phosphorus levels for managing harmful cyanobacterial blooms. Extremely randomized trees (ET) with MinMax scaling and multivariate imputation offer a cost-effective solution for water quality monitoring.
Area of Science:
- Environmental Science
- Water Quality Monitoring
- Machine Learning Applications
Background:
- Harmful cyanobacterial blooms (HCB) pose risks to drinking water treatment and human health.
- Effective eutrophication and HCB management requires continuous monitoring of nitrogen (N) and phosphorus (P).
- High-frequency water quality monitoring is often cost-prohibitive.
Purpose of the Study:
- To develop and evaluate machine learning-based virtual sensors for predicting N and P concentrations.
- To identify optimal machine learning models, data scaling techniques, and imputation methods for water quality prediction.
- To assess the performance of virtual sensors in contrasting rural and urban catchments.
Main Methods:
- Employed six machine learning algorithms: random forest, extremely randomized trees (ET), extreme gradient boosting, k-nearest neighbors, light gradient boosting machine, and bagging regressor.
- Investigated the impact of data scaling (MinMax scaler) and missing value imputation (multivariate imputer).
- Utilized Shapley additive explanations for feature importance ranking.
Main Results:
- Extremely randomized trees (ET) demonstrated the best predictive performance.
- MinMax scaler and multivariate imputer were identified as the optimal scaler and imputer, respectively.
- Achieved high predictive performance with R² values of 97% in a rural catchment and 82% in an urban catchment.
Conclusions:
- Machine learning virtual sensors provide a viable and cost-effective alternative for high-frequency water quality monitoring.
- The ET model, combined with MinMax scaling and multivariate imputation, offers a robust approach for predicting N and P.
- These virtual sensors can aid catchment managers in controlling eutrophication and mitigating harmful cyanobacterial blooms.
Related Concept Videos
Key Elements for Plant Nutrition
Gas Chromatography: Types of Detectors-II
Inorganic Nitrogen Assimilation

