Machine learning-based water demand forecasting for Windhoek, Namibia using ANN-LSTM, SVR, and Random Forest models. Includes data preprocessing, model training, evaluation, and conservation scenario simulation.
This repository presents a comprehensive implementation and analysis of a machine-learning framework for forecasting urban water demand in Windhoek, Namibia. The study evaluates three predictive models: ANN-LSTM, Support Vector Regression (SVR), and Random Forest Regression (RFR), utilizing both lag-based univariate inputs and multivariate feature sets that include temperature, precipitation, and population. Random Forest Regression consistently demonstrated superior performance (R² ≈ 0.97 for univariate and 0.95 for multivariate inputs), surpassing ANN-LSTM and SVR in terms of accuracy, stability, and generalization. The accompanying notebook details the processes of data preprocessing, feature engineering, hyperparameter tuning, model evaluation, and visualization. Additionally, a scenario-based simulation using the optimal model quantifies the effects of a 10% reduction in behavioral water use, illustrating the integration of machine-learning predictions into practical conservation strategies.