A machine learning project to predict water quality parameters across river locations in South Africa, with emphasis on identifying key factors influencing water quality variation.
# π Water Quality Prediction
A machine learning project to predict water quality parameters across river locations in South Africa, with emphasis on identifying key factors influencing water quality variation.
**Project Objective:**
Develop a robust ML model capable of predicting water quality parameters (total alkalinity, electrical conductance, dissolved reactive phosphorus) and identify the key environmental and geographic factors that significantly influence these measurements.
---
## π Project Structure
This project follows a strict separation of concerns.
```
βββ data/
β βββ raw/ # Original water quality dataset (2011-2015, ~200 locations)
β βββ processed/ # Cleaned & feature-engineered data
β βββ external/ # Geographic/environmental reference data
β
βββ notebooks/ # Experimental Laboratory
β βββ 00_data_collection.ipynb # Data loading & exploration
β βββ 01_eda_and_discovery.ipynb # Discovery & Analysis (Split-First: Train Only)
β βββ 02_preprocessing.ipynb # Feature Engineering & Transformation
β βββ 03_model_training.ipynb # Model Training with MLflow Tracking
β βββ 04_inference_test.ipynb # Validation & Feature Importance Analysis
β
βββ src/ # Production Codebase
β βββ config.py # Global Control Center (Paths, Params)
β βββ data_loader.py # Robust Data Ingestion & Splitting
β βββ preprocessing.py # Reusable Cleaning & Feature Engineering Logic
β βββ train.py # Model Training Pipeline
β βββ inference.py # Prediction Engine
β βββ utils.py # Helper Functions
β
βββ models/ # Serialized Models (.pkl, .pth)
βββ app/
β βββ main.py # User Interface (Streamlit/FastAPI)
βββ mlflow.db # MLflow Experiment Tracking Database
βββ requirements.txt # Dependencies
```
--- β¦