Machine Learning models to predict the multi-class functionality of water wells in Tanzania
## Overview
The Water Project is a non-profit organization which helps to reduce water scarcity in sub-Saharan Africa by providing the necessary resources for water well construction. Our team is helping The Water Project by using machine learning models to predict the functionality of wells throughout Tanzania. More specifically, we aim to identify wells that are in working condition but are in need of repair to guide The Water Project's future work in this region. This allows them to maximize water access while allocating resources in the most efficient way.
## Data Understanding
The source of our data was Taarifa organization and the Tanzanian Ministry of Water. The dataset contained over 59000 rows of 40 feature columns describing waterpoints in the region installed between the years 1960 and 2013. It was hosted at drivendata.org as a data analysis competition. If you want descriptions of each feature, you can find them here.
A map of the administrative districts in Tanzania
## Data Preparation
Once the data was imported, we analyzed it for nulls and missing values, as well as inspected each column for relevancy to our project.
## Model Selection
We split our data into training and test sets, then transformed and scaled numerical data and transformed and binary encoded our categorical data.
Since our target column, the functionality of the well, showed a significant class imbalance, we created synthetic data to oversample the "functional needs repair" class, in order to run unbiased predictive models on it.
We then created a baseline dummy model to compare our results to.
We used three different modeling algorithms, K-Nearest Neighbors, Random Forest Classifier, and Logistic Regression. These were all from the Scikit-Learn library.
To select the best model, we ran a series of grid searches for hyperparameter tuning. See our final notebook for details and results of each step of the process.
## Results
We found the model that returned the highest recall …