Predict whether a household has access to an Improved Source of Drinking Water using India’s NSSO MIS-78 survey data.
This repository contains code exported from IBM watsonx.ai AutoAI, specifically a Jupyter Notebook implementing a LightGBM-based machine learning model and all necessary assets to reproduce predictions and model evaluation.
notebook/water_access_autoai.ipynb: Exported AutoAI notebook (core code)data/: Raw and processed datasets (MIS-78 survey)models/: Saved (pickled) trained model pipelinesrequirements.txt: Python dependenciesREADME.md: Project documentation
- Clone the repository git clone https://github.com/your-user/WaterAccessML.git cd WaterAccessML
text 2. Prepare your environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
text 3. Launch the notebook jupyter notebook notebook/water_access_autoai.ipynb
text The first cells will load and reconstruct the AutoAI pipeline and LightGBM model.
- Test prediction sample from joblib import load import pandas as pd
model = load("models/water_access_lgbm.pkl") sample = pd.read_csv("data/sample_households.csv") preds = model.predict(sample) print(preds)
text
| Item | Value |
|---|---|
| Algorithm | LightGBM Classifier (AutoAI Pipeline #2) |
| Cross-validated accuracy | 0.991 |
| Input features | 25 socio-economic & infra variables |
| Target label | Improved_Source_Water (Yes/No) |
| Training method | 3-fold CV, hyperparameter optimization |
- Update or add new survey data to the
data/folder. - Rerun notebook training cells.
- Updated model pipeline will be saved to
models/.
Users with IBM Cloud access:
- Create a watsonx.ai Runtime (Lite plan is sufficient).
- Promote the trained model from
models/to a Deployment Space. - Deploy as an Online Service for REST prediction API.
- Data analysis and cleaning
- Model selection with AutoAI
- AutoAI notebook export and refactor
- SHAP/interpretability dashboard (planned)
- Web/app user interface (planned)
- CI/CD workflows (planned)
PRs (pull requests) are welcome.
Start a discussion before major changes or enhancements.
MIT License. See LICENSE.