Applied Sciences (Sep 2024)

Hypertuning-Based Ensemble Machine Learning Approach for Real-Time Water Quality Monitoring and Prediction

  • Md. Shamim Bin Shahid,
  • Habibur Rahman Rifat,
  • Md Ashraf Uddin,
  • Md Manowarul Islam,
  • Md. Zulfiker Mahmud,
  • Md Kowsar Hossain Sakib,
  • Arun Roy

DOI
https://doi.org/10.3390/app14198622
Journal volume & issue
Vol. 14, no. 19
p. 8622

Abstract

Read online

In the present day, the health of the populace is significantly jeopardized by the presence of contaminated water, and the majority of the population is unaware of the distinction between safe and unsafe water consumption. Agricultural, industrial, and other human-induced activities are causing a significant decline in the availability of drinking water. Consequently, the issue of ensuring the safety of ingesting water is becoming increasingly prevalent. People should be aware of the purity of the water and the locations where it can be used in order to resolve this situation. There are numerous IoT-based system architectures that are capable of monitoring water parameters; however, the majority of these architectures do not allow for real-time water quality prediction or visualization. In order to achieve this, we suggest a wireless framework that is based on the Internet of Things (IoT). The sensors are able to capture water parameters and transmit the data to the cloud, where a machine learning (ML) model operates to classify the water quality. After that, Grafana enables us to effortlessly visualize the real-time data and predictions from any location. We employed a multi-class dataset from China for the model’s construction. GridSearchCV was implemented to identify the optimal parameters for model optimization. The proposed model is a combination of the Random Forest (RF), Extreme Gradient Boosting (XGB), and Histogram Gradient Boosting (HGB) models. The accuracy of the model for the China dataset was 99.80%. To assess the robustness of the proposed model, we acquired a new dataset from the Bangladesh Water Development Board (BWDB) and used it to test the proposed model. The model’s accuracy for this dataset was 99.72%. In summary, the proposed wireless IoT framework enables individuals to effortlessly monitor the purity of water and view its parameters from any location.

Keywords