# Classifying Tanzania Wells Based on Functionality
**Author:** Jack Mannix
## Summary
A model trained to predict the functional status (‘Functional’ or ‘Non-functional’) of a well in Tanzania allows responsible entities to be notified when a well is in need of repair
## Business Problem
WaterTanzania, a nonprofit, wants to improve access to water across Tanzania. To do so, they want to be able to send alerts to the entities in charge of a well(s) to check the status its functional status. Ontop of sending alerts when a well is deemed 'non-functional,' WaterTanzania also wants to send precautionary alerts based on observed well characteristics in order to repair wells before they become 'Non-functional'. With this goal in mind, the nonprofit needs an algorithm that can accurately predict the status of a well, and prioritize minimal false predictions for wells that are actually 'non-functioning'.
## Data and Methods
All models were trained and tested on data collected from 47,304 wells
- Data provided by TAARIFA and DrivenData
- Data collected 2011 - 2013
- Models used
1. Logistic Regression
2. DecisionTree
3. RandomForest
5. XGBoost
### Assumptions
The original data provided three target variables
1. Functional
2. Non-functional
3. Funcional-Needs Repair
Due to a major class imbalance against 'Functional-Needs Repair', preliminary models produced severly low recall for this variable
To address this imbalance, 'Non-functional' and 'Functional-Needs Repair' were combined due to the following considerations:
1. A well that is 'Functional-Needs Repair' is not fully functional, and will decline to 'Nonfunctional' if not addressed
2. Additional issues of misclassification arise:
- Wells that are 'Non-functinonal' that are classified as 'Functional-Needs Repair' would be less of a priority to fix
- Wells that are 'Functional-Needs Repair' that are classified as 'Functional' miss the chance for being repaired before becoming 'Non-functional'
3. Additional m …