AWS Builder Center

FloodLine TN: An Explainable AI Flood Risk Classifier for Tamil Nadu

Building a machine learning system that classifies flood risk as Low, Medium, or High across Tamil Nadu — using XGBoost and SHAP to make every prediction explainable, not just accurate.

The Problem

Flood prediction models are often black boxes — they output a risk score, but nobody can explain why. For a system meant to inform real decisions (evacuations, resource allocation), that's a serious gap. FloodLine TN was built to fix that: a flood risk classifier for Tamil Nadu that is both accurate and interpretable.

What It Does

FloodLine TN classifies flood risk into three clear categories — Low, Medium, High — based on:
  • Rainfall data
  • River water levels
  • Soil moisture
  • Elevation
Instead of stopping at a prediction, it uses SHAP (Shapley Additive Explanations) to show exactly which factors drove each classification. So if a region is flagged High risk, you can see whether it's primarily rainfall-driven, river-level-driven, or a combination — which matters a lot for how authorities respond.

Tech Stack

  • Model: XGBoost — chosen for strong performance on structured/tabular environmental data
  • Explainability: SHAP — to break down feature contributions per prediction
  • Frontend: React.js
  • Backend: FastAPI
  • Visualization: Leaflet.js for mapping risk zones geographically

Why Explainability Matters Here

Disaster-response tools don't just need to be right — they need to be trusted. A local authority deciding whether to issue an evacuation order can't act on a mystery score. SHAP values let FloodLine TN show its reasoning in a way a non-technical decision-maker can actually use, which was one of the biggest design priorities from the start.

Challenges

Balancing model complexity with interpretability was the trickiest part. More complex models slightly improved accuracy but made explanations noisier. XGBoost with SHAP hit the sweet spot — strong predictive power while keeping feature attributions clean and actionable.

What's Next

I'm looking at incorporating satellite-based soil moisture data for more granular, near-real-time updates, and eventually connecting FloodLine TN's outputs into the alert pipeline I built for KAVALAN.


Part of my ongoing work on AI-driven disaster intelligence. Happy to discuss the modeling choices or explainability approach with anyone working on similar problems!
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article