# Water Quality Monitoring: A Water Quality Dataset from an On-Site Study in Macao
## 6 Conclusions  
This study presents a comprehensive water quality dataset collected in Macao, utilizing an advanced Raspberry Pi-based multi-sensor system that monitors critical water quality parameters, such as pH, total dissolved solids (TDSs), temperature, and turbidity. The dataset, consisting of over 5000 entries, provides real-time monitoring data, which is essential for urban water quality management. To ensure the accuracy and reliability of the collected data, we employed a three-level classification system and a composite scoring approach for water quality assessment. Multiple machine learning algorithms, including Random Forest, Isolation Forest, Logistic Regression, and Local Outlier Factor (LOF), were applied for data validation. Among these, the Random Forest model demonstrated exceptional performance, achieving an accuracy of 98.10% and an F1 score of 98.99%,  
\begin{table}
\begin{tabular}{c c c c c} \hline
**Model** & **Precision** & **F1 Score** & **Accuracy** & **AUC** \\ \hline Isolation Forest & 97.7\% & 98.56\% & NA & 0.85 \\ Random Forest & 97.99\% & 98.99\% & 98.10\% & 0.91 \\ Logistic Regression & 96.76\% & 98.36\% & 96.90\% & 0.86 \\ Local Outlier Factor & 93.54\% & 96.66\% & NA & 0.75 \\ \hline \end{tabular}
\end{table}
Table 5: This is a model evaluation and performance table.  
making it highly effective in anomaly detection and classification tasks. The findings confirm that the dataset aligns with Macao's building water safety standards, providing a solid foundation for the development of intelligent water quality monitoring systems and pollution warning frameworks. This system's real-time detection and anomaly classification capabilities make it an invaluable resource for improving water quality management practices. Furthermore, this research supports the \"Safe Drinking Water for Buildings\" initiative in Macao, contributing significantly to public health and environmental protection efforts by ensuring safe and stable drinking water for the population. Future research will focus on expanding the system to detect microbial and chemical pollutants, improving machine learning models for better anomaly detection, and incorporating real-time analysis techniques like wavelet analysis. Additionally, advanced sensors will be explored to capture more water quality parameters. The system's integration with urban water management strategies and enhancement of its scalability and cost-effectiveness will also be key for broader applications, ensuring sustainable and efficient water quality management in diverse environments.  
Conceptualization, J.G.; methodology, J.G.; software, J.G.; validation, J.G. and B.C.; formal analysis, [PERSON] and B.C.; investigation, B.C.; resources, [PERSON] and S.-K.T.; data curation, B.C.; writing--original draft preparation, J.G.; writing--review and editing, S.-K.T.; visualization, S.-K.T.; supervision, S.-K.T.; project administration, S.-K.T. All authors have read and agreed to the published version of the manuscript.  
This research received no external funding.  
Not applicable.  
The dateset and code presented in this study are openly available at ([[https://github.com/PriGaJiawei/Macao-water-dataset](https://github.com/PriGaJiawei/Macao-water-dataset)]([https://github.com/PriGaJiawei/Macao-water-dataset](https://github.com/PriGaJiawei/Macao-water-dataset)) (accessed on 4 March 2025)).  
The authors declare no conflicts of interest.