Machine Learning Models for prediciting water at South Africa
# EY Water Quality Prediction — AI Data Challenge 2026
Predicting **3 water quality parameters** (Total Alkalinity, Electrical Conductance, Dissolved Reactive Phosphorus) for **unseen river locations** across South Africa.
> **Evaluation metric:** Mean R² across all 3 targets.
## 🏗️ Project Structure
```
water-quality-prediction/
├── config/
│ ├── base.yaml # Pipeline configuration
│ └── feature_sets.yaml # Per-target selected features (from notebook 03)
├── data/
│ ├── 01-raw/ # Immutable source CSVs (from EY)
│ ├── 02-processed/ # Cleaned parquet files
│ └── 03-external/ # External features (generated on Kaggle)
├── docs/
│ ├── DEVLOG-DS.md # Experiment log (R² per experiment)
│ ├── AGENTS-DataScientist.md # Data science methodology guidelines
│ ├── 2026_EY_AI_... # Challenge guidance
│ └── ey_winners_approach.md # Past winners' reference
├── notebook/
│ ├── kaggle/ # 8 Kaggle-compatible notebooks (main pipeline)
│ ├── ey_provide/ # EY-provided benchmark notebooks (reference)
│ └── custom_snowflake_archive/ # Archived Snowflake-based notebooks
├── src/
│ ├── data_ingestion.py # API calls, checkpoint logic
│ ├── feature.py # Feature engineering utilities
│ ├── spatial_cv.py # Spatial cross-validation (LeaveStationGroupOut)
│ ├── ensemble.py # OOF stacking ensemble framework
│ └── utils.py
└── requirements.txt
```
## 🧪 Experiment Batching Strategy
Every dataset must **earn its place** through measured R² improvement:
| Exp | Name | Datasets Added | Purpose |
|-----|------|----------------|---------|
| 0 | Baseline | Water Quality only | Floor: naïve baselines |
| 1 | EY Core | + Landsat + TerraClimate | Provided satellite features |
| 2 | External APIs | + SoilGrids + Weather + Elevation + OSM | Domain-driven features |
| 3 | Spatial Co …