Logo Lanfrica

NickMwai/project

Domain:

environment and energy

Record type:

project
Creator:
Nic
Host:
tanzania water model # Water Pump Functionality Prediction A machine learning project that predicts the operational status of water pumps in rural Tanzania using metadata. The goal is to support proactive maintenance and ensure sustainable water access. ## Project Overview This project uses the Tanzania Water Pump dataset from DrivenData. It applies data preprocessing, feature engineering, and classification models to predict whether a pump is: - Functional - Functional but needs repair - Non-functional Achieved **81% accuracy** using a Random Forest Classifier. ## Tech Stack / Tools - Python (Pandas, scikit-learn, matplotlib, seaborn) - Jupyter Notebook - XGBoost / RandomForest - SMOTE (imbalanced-learn) ## How to Run the Project 1. Clone the repo: ```bash git clone github.com cd water-pump-predictor ``` 2. Install dependencies: ```bash pip install -r requirements.txt ``` 3. Run the notebook: ```bash jupyter notebook notebooks/Water_Pump_Model.ipynb ``` 4. (Optional) Predict on new data: ```python model.predict(new_data) ``` ## Project Structure ``` ๐Ÿ“ data/ โ””โ”€โ”€ Training_Set_Values.csv โ””โ”€โ”€ Training_Set_Labels.csv โ””โ”€โ”€ Test_Set_Values.csv ๐Ÿ“ notebooks/ โ””โ”€โ”€ Water_Pump_Model.ipynb ๐Ÿ“„ README.md ๐Ÿ“„ requirements.txt ``` ## ๐Ÿ“ˆ Results - Accuracy: 81% - Confusion Matrix: - Functional: Precision 0.81, Recall 0.89 - Needs Repair: Precision 0.55, Recall 0.33 - Non-functional: Precision 0.84, Recall 0.78 Visualizations and model performance plots available in the notebook. ## ๐Ÿ“ข Business Impact - Enables data-driven pump maintenance in rural communities - Reduces downtime and repair costs - Improves infrastructure planning and public service delivery ## ๐Ÿ”ฎ Future Work - Improve "Needs Repair" classification using better features - Deploy model as a REST API - Integrate with GIS dashboards