Development of a Machine Learning Model for Predicting Hardness in the Water Treatment Pharmaceutical Industry
Abstract
The pharmaceutical industry has a water treatment process for production needs, and the softener process reduces the content of Ca2, Mg2. Few studies have been conducted to predict hardness in water. Some related studies have been undertaken to indicate lake water quality, water sulfur content, and water content in reverse osmosis output in factory water systems. This study aims to determine the prediction of hardness in water treatment systems using machine learning random forest regression and long short-term memory. The dataset is from Programmable Logic Controller records and daily sampling data from pharmaceutical factory laboratories. Machine learning models developed hyperparameter tuning processes to get the most optimal results. The best machine learning model is RFR with R2 Train 0.990 and R2 Test 0.960, while LSTM with R2 Train 0.946 and R2 Test 0.917.