Data Science
Road Accident Fatalities across Indian States: An Applied Statistical Study of MoRTH Open Data
What five years of state-wise crash data say about where and why Indian roads kill — cleaned, tested and visualised
- Python
- pandas
- NumPy
- +5
Baselines, confusion matrices and thresholds on UCI's ILPD — screening, not diagnosis
Mapped to your syllabusUniversity of Calcutta CCF 2022 (4-year) · Research project (Hons with Research) · Semester 7–8Comparative Evaluation of Classifiers for Liver-Disease Screening is an ethics-framed research study for the University of Calcutta CCF Honours-with-Research project (Semesters 7–8). It takes the Indian Liver Patient Dataset (ILPD) — 583 anonymised patient records from north-east Andhra Pradesh, hosted on the UCI Machine Learning Repository under a CC BY 4.0 licence — and asks a question most student projects skip: which classifier would you actually trust in a screening context, and measured how?
The study trains and compares a majority-class baseline, logistic regression, a decision tree, a random forest, k-nearest neighbours and an SVM with an RBF kernel, using a leak-free protocol: a stratified train/test split, preprocessing fitted on training data only, and 5-fold stratified cross-validation on the training portion. Because 416 of 583 records are liver patients, a model that always predicts "patient" already scores 71.3% accuracy — so the evaluation leans on confusion matrices, precision, recall, specificity, F1 and ROC-AUC instead of accuracy alone.
The distinctive part is the threshold discussion. A screening tool wants high sensitivity, because a false negative is a missed referral while a false positive is merely an extra confirmatory test; the study shows how moving the decision threshold trades one cost for the other and why the default 0.5 threshold is not sacred. An ethics register documents that the data was received already anonymised, that only aggregate results are reported, and that the output is a methods study — never a diagnostic tool.
Syllabus alignment
Liver ailments are among India's growing non-communicable disease burdens, and screening programmes depend on cheap statistical tools that flag people for confirmatory tests. Student projects and even published papers train classifiers on the Indian Liver Patient Dataset and report an accuracy figure, but three things are usually missing: a majority-class baseline that exposes what accuracy means under a 71.3%/28.7% class split, a leak-free train/test protocol where scaling and imputation are fitted only on training data, and any discussion of the decision threshold — the single number that decides whether the tool errs toward missed patients or toward unnecessary follow-up tests. There is also rarely an explicit ethics statement about handling patient-derived data.
The need is therefore not another classifier, but a demonstrably fair evaluation: one dataset, six models, one protocol, metrics chosen for a screening context, a threshold sensitivity analysis, and an ethics register — all reproducible from fixed seeds on an ordinary laptop.
This research project evaluates six classifiers — a majority-class baseline, logistic regression, decision tree, random forest, k-nearest neighbours and an SVM (RBF kernel) — on the UCI Indian Liver Patient Dataset, a 583-record, 10-feature, anonymised dataset collected in north-east Andhra Pradesh. With a stratified, leak-free train/test protocol and cross-validation, the study compares confusion-matrix metrics and ROC curves, and then analyses the decision threshold specifically for a screening (not diagnostic) use case, framed by an explicit ethics register.
Liver diseases are a significant and often silent burden in India, and population-level screening aims to flag people who should get a confirmatory test — not to diagnose them. A classifier used in such a setting is judged differently from a classroom exercise: misses are costly in one direction and nuisance costs in the other. This project is deliberately positioned as a model-evaluation study, not a medical-software build, so the scientific questions are about protocol, metrics and thresholds rather than about deployment.
The pipeline is: acquire ILPD from UCI; audit it (types, the four missing A/G-ratio values, duplicate rows); explore it with class- and gender-wise distributions; preprocess with median imputation and standardisation inside a fitting-on-train-only pipeline; train the six models under 5-fold stratified cross-validation; evaluate on a held-out stratified test set; and analyse the sensitivity/specificity trade-off across thresholds. All code runs from fixed random seeds, and every figure in the report regenerates from the notebook.
In scope
Out of scope (and why)
The project follows a quantitative experimental research design organised as a CRISP-DM-style loop (business understanding → data understanding → preparation → modelling → evaluation → reporting), adapted to the two-semester CCF research slot. Monthly supervisor meetings are the checkpoint for each phase; the ethics register is opened in the first month and maintained until submission.
| Phase | Weeks | Activities | Deliverable |
|---|---|---|---|
| Orientation | 1–3 | Literature study: ILPD papers, screening-metric theory, class-imbalance handling; write the research question and ethics register v1 | Research proposal, reading log |
| Data understanding | 4–7 | Download ILPD from UCI; audit types, missing A/G-ratio values, duplicates; EDA notebook with class, gender and feature distributions | Data audit report, EDA notebook |
| Preparation | 8–10 | Preprocessing pipeline (median imputation, standardisation); stratified 80/20 split; leakage checklist | Preprocessing module and protocol document |
| Modelling | 11–14 | Majority baseline plus five classifiers; 5-fold stratified CV on the training portion; hyperparameter grid kept small and justified | Trained models, CV results table |
| Evaluation | 15–18 | Held-out test evaluation: confusion matrices, precision/recall/specificity/F1, ROC-AUC, PR curves; threshold sweep analysis | Results chapter draft, threshold plot |
| Writing | 19–22 | Full dissertation draft; limitations chapter; reproducibility check from a clean environment | Complete draft |
| Review and defence | 23–24 | Supervisor corrections, final formatting, seminar and viva preparation | Final submission |
Robustness of the comparison: every model is scored with the same folds, the same seeds and the same metrics; cross-validation results are reported as mean ± standard deviation across folds; the held-out test set is touched exactly once per model, after all model selection is finished.
The study is a two-notebook pipeline plus a shared module, designed so that a stranger can reproduce every number: 01_eda.ipynb produces the data audit and figures; 02_train_eval.ipynb runs the protocol and writes a results table; common.py holds the split logic and metric helpers so both notebooks use identical code. Intermediate artefacts (clean data, fitted preprocessors, predictions) are written to disk, so evaluation can be re-run without retraining.
flowchart TD
U["UCI ILPD download: 583 records, 10 features"] --> A["Audit: types, 4 missing A/G values, duplicates"]
A --> E["01_eda.ipynb: class, gender and feature distributions"]
A --> P["Preprocessing: median impute + standardise, train-only fit"]
P --> S["Stratified 80/20 split, fixed seed"]
S --> CV["5-fold stratified CV on training portion"]
CV --> M["Models: baseline, logistic, tree, forest, k-NN, SVM RBF"]
M --> H["Held-out test evaluation"]
H --> CM["Confusion matrices, precision, recall, specificity, F1"]
H --> ROC["ROC-AUC and PR curves"]
ROC --> T["Threshold sweep: sensitivity vs specificity"]
CM --> R["results.csv and figures"]
ROC --> R
T --> R
R --> D["Dissertation chapters"]
ETH["Ethics register"] --> DThe evaluation protocol is worth a diagram of its own, because the separation of data is where most published ILPD studies go wrong:
flowchart LR
ALL["All 583 records"] --> TR["Training 80%: CV folds live here"]
ALL --> TE["Test 20%: sealed until final scoring"]
TR --> F["Imputer and scaler fitted here"]
F --> CVR["5-fold stratified CV and model selection"]
CVR --> BEST["Best model per family"]
TE --> FINAL["Single final scoring of best models"]Design decisions to defend in the viva: imputation and scaling live inside the pipeline object so they refit per CV fold; the majority-class baseline is scored with the same protocol as the real models; and the threshold sweep happens after ROC analysis, on validation predictions rather than on the test set, so the test set remains an honest final measurement.
Package 01
Downloads ILPD from the UCI repository (direct CSV or the ucimlrepo package), verifies the 583×11 shape, documents the four missing A/G-ratio values and any duplicates, records the CC BY 4.0 licence, and opens the ethics register that governs the rest of the study.
Package 02
A notebook of class-wise and gender-wise distributions for age, Total Bilirubin, Direct Bilirubin, Alkaline Phosphatase, SGPT, SGOT, Total Proteins, Albumin and A/G ratio, with box plots and correlation heatmap, plus a written note on how the 416/167 imbalance shapes every later choice.
Package 03
A scikit-learn Pipeline that median-imputes the missing A/G ratio and standardises features, fitted on training data only; a stratified 80/20 split with a fixed seed; and a printed leakage checklist (nothing fitted on test, no duplicate rows spanning both sets) that the notebook re-verifies at each run.
Package 04
Implements the majority-class predictor plus logistic regression, decision tree, random forest, k-NN and SVM (RBF) with small, justified hyperparameter grids, all trained under identical 5-fold stratified cross-validation and reported as mean ± standard deviation across folds.
Package 05
Scores the sealed test set once per model: confusion matrix, accuracy, precision, recall, specificity, F1, ROC-AUC and PR curve; then sweeps the decision threshold to plot sensitivity against specificity and discusses the operating point a screening workflow would choose.
Package 06
Generates results.csv and every figure from code, pins library versions in requirements.txt, includes a README describing the two notebook runs, and carries the ethics register and limitations chapter into the dissertation's final structure.
Slide 1
Comparative Evaluation of Classifiers for Liver-Disease Screening
Slide 2
Why Screening Evaluation Is Different
Slide 3
The Dataset and Its Quirks
Slide 4
The Problem with Accuracy-Only Studies
Slide 5
Protocol: Leak-Free by Construction
Slide 6
Models Compared
Slide 7
Evaluation Metrics
Slide 8
Results: Cross-Validation and Test
Slide 9
Threshold Analysis for Screening
Slide 10
Ethics Register
Slide 11
Limitations
Slide 12
Conclusion and Future Scope
Bullets, speaker notes and the .pptx · ₹2,000
Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.
Because 416 of 583 records are liver patients, a model that predicts the majority class for everyone scores 71.3% accuracy while being clinically useless. That is exactly why the majority-class baseline is scored under the same protocol: any model's accuracy is meaningful only relative to that floor.
Recall is the share of true patients the camp correctly flags — the people who will actually be sent for confirmatory tests. Precision is the share of flagged people who really are patients. In screening, low recall means missed patients, while low precision means wasted confirmatory tests, so the two costs are weighed explicitly.
ROC-AUC is the probability that a random patient record receives a higher risk score than a random non-patient record, summarising performance across all thresholds. With a 71/29 class split the ROC curve can look flattering, so precision-recall curves, which focus on the positive class, give a more honest picture of screening behaviour.
+11 more questions, with answers
Unlocks with the project · ₹2,000
Unlock for ₹2,000What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.
Unlocks with the project · ₹2,000
Unlock for ₹2,000How to study it, adapt it and walk your examiner through it, step by step.
Unlocks with the project · ₹2,000
Unlock for ₹2,000OnlyProjects. (2026). Comparative Evaluation of Classifiers for Liver-Disease Screening on the Indian Liver Patient Dataset: B.Sc Data Science project bundle [Educational resource]. https://onlyprojects.online/projects/bsc-ds-liver-disease-screening-classifier-evaluation
Keep browsing
Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.
Data Science
What five years of state-wise crash data say about where and why Indian roads kill — cleaned, tested and visualised
Data Science
From CPCB's open data to policy-ready dashboards for four metro cities
Agriculture
Cattle-dung blends with paddy straw, leaf litter and market waste, benchmarked against FCO Schedule IV specifications
Biochemistry
A p-nitrophenyl phosphate assay read at 405 nm, non-linear Michaelis-Menten fitting, and competitive inhibition by inorganic phosphate
Biotechnology
Four disinfestation protocols, 144 nodal explants on MS medium, and chi-square tests that decide which protocol actually wins
Botany
Frequency, density, abundance and IVI from 20 nested quadrats, with Shannon, Simpson and Jaccard comparisons of a protected and a disturbed plot