Logo Lanfrica

danielmwaka/supervised-ml-classifiers-for-predicting-water-wells-condition

Domain:

environment and energy

Record type:

project
Creator:
dan
Host:
This project builds, tunes and evaluates the respective performance of a baseline DecisionTreeClassifier, a GradientBoostingClassifier, and a RandomForestClassifier. These three classifiers are hyperparameter-tuned, and their respective performance compared to select best model for predicting the condition of water-wells in Tanzania. # Supervised ML Classifiers for Predicting Water Wells Condition ## 1. Project Overview This project explores the use of supervised machine learning classifiers to predict the condition of water wells in Tanzania. By leveraging a ternary classification approach, the goal is to distinguish between wells that are functional, non-functional, or functional but in need of repair. The workflow encompasses data preprocessing, model building, evaluation, and actionable recommendations to support sustainable water resource management. ## 2. Business Understanding Access to clean and reliable water is a critical challenge in Tanzania. Many wells fall into disrepair or become non-functional, impacting communities' health and livelihoods. Predicting the condition of water wells enables stakeholders to prioritize maintenance, allocate resources efficiently, and ensure long-term water access. This project addresses the question: **_Can supervised ML classification models trained on available data predict the operational status of a water-well in Tanzania ?_** ## 3. Data Preprocessing The Data Preprocessing Pipeline encompases the following steps that are executed sequentially to prevent data-leakage: 1. Define Exog and Endog. 2. Perform Train-Test split. 3. Drop rendundant and irrelevant columns in **X_train**. 4. Handle missing values in **X_train**. 5. Feature engineering on **X_train**. 6. Multicollinearity check on numerical features in **X_train**. 7. Numerical Features' Normalization in **X_train**. 8. Categorical Features' OneHot Encoding in **X_train**. 9. Target Variable Label Encoding in **y_train**. 10. Address Class Imbalance in **y_train** 11. Preprocess Test set (**X_test** and **y_test**): Steps 3 to 9. 12. Preprocess Evaluation Data (**testdata.csv**) Steps 3 to 8. ## 4. Modelling Multiple supervised ML classifiers are build, trained on a balanced training set, tuned, and their respective performance analyzed to determine the best-fit model for predictin …