Logo Lanfrica

kaitlyn-k-zeichick/Project-3

Domaine:

environment and energy

Type de record:

project
Créateur:
kai
Hôte:
Predicting faulty water pumps in Tanzania # Project 3: Predicting faulty water pumps in Tanzania ## Description This project focused on predicting faulty water pumps in Tanzania. The project was divided into two problem statements: 1. Predicting faulty water pumps so that the Ministry of Water can reach out to communities that are likely to have faulty water pumps. This requires a highly accurate model, at the expense of sacrifing interpretability. 2. Identifying features that increase the odds of a faulty water pump so that the Ministry of Water can take preventative measures. For this model, interpretability is the priority. ## Data Used The data was downloaded off of DrivenData. DrivenData had gotten the data from Taarifa and the Tanzania Ministry of Water. ## Features and Target Target: Functional/Non-functional Features: * Location * Longitude/Latitude * Basin * Region * GPS Height * Water pump * Amount Total Static Head * Extraction Type * Waterpoint Type * Construction Year * Water * Payment * Quality * Quantity * Source * Management * Management Group * Public Meeting * Scheme Management * Permit * Usage * Population ## Data Cleaning and Pre-Processing I dropped features with high collinearity, and I dropped features that were irrelevant to the problem or that had too many variables. Then I dropped all missing values and removed outliers. I used label encoding for some features and get_dummies for others. Then I used feature engineering to create some new variables that I thought might be relevant, such as gps height and amount tsh. Basic EDA was used to explore correlations between features. SQL was used to explore specific hypotheses, such as if the type of pump installed is correlated with the population of the surrounding area (which turned out to be true). ## Model 1: Maximizing Accuracy First, I got the initial scores for various models (logistic regression, KNN, Random Forest, and XGBoost). Random Forest and XGBoost had the highest scores, so I used RandomizedCV to tune their hyperpara …