Comparing TinyML Models and Libraries for On-Device Water Potability Classification - Pereira, Emanuel; Santos, Jeferson; Barboza, Erick (Anais do Simpósio Brasileiro de Engenharia de Sistemas Computacionais (SBESC), 2024)
Water pollution, mainly caused by human activities that elevate harmful substance concentrations above ideal levels, threatens both the supply and quality of drinking water and also adversely affects economic development and environmental sustainability. Machine learning, combined with TinyML and the Internet of Things, is being used to predict drinking water classification, providing a promising alternative to traditional water sample monitoring. This study aims to compare various machine learning models and TinyML libraries to solve the classification problem of water potability. The Random Forest algorithm showed the best performance in Accuracy, Precision, Recall, and Fl-Score, with Emlearn and Micromlgen libraries achieving the fastest inference time of 362 milliseconds. The multilayer perceptron model with the EmbML library used the least memory, with 283,113 bytes, and the Random Forest model with Micromlgen had the lowest energy consumption, using only 104.534 millijoules. This work can help researchers and professionals implement water potability classification systems and use TinyML in other classification problems as well.