Skip to content
OnlyProjects
B.Sc · Data ScienceFor educational purposes only

Comparative Evaluation of Classifiers for Liver-Disease Screening on the Indian Liver Patient Dataset

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–8

Overview

1 min read

Comparative 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.

Relevant for
West Bengal
Level
Advanced · 24 weeks · solo
Common at
University of Calcutta, University of Mumbai, University of Delhi
Updated
Nov 2026

Syllabus alignment

University of Calcutta · CCF 2022 (4-year)

Research project (Hons with Research) · Semester 7–8

Subjects this project applies
  • Python (CCF core)
  • Machine Learning with Python (DSE elective)
  • Spreadsheets (SEC-1)
  • DBMS (DSE elective)
How it is evaluated

See your department's project guidelines.

Also fits: Mumbai University B.Sc IT 2022-23 (autonomous-college mirror), Delhi University UGCF 2022, BCU / Bangalore University SEP 2024.

What's in the box

11 parts · 5 free · 3 previewed · 3 unlock for ₹2,000

Problem & synopsis

5 min read

Problem statement

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.

Synopsis

Abstract

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.

Introduction

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.

Existing work and the gap

  • Published ILPD accuracy-chasing papers commonly report one accuracy number from a single random split, occasionally with scaling fitted before the split (a leakage bug) and almost never with a majority-class baseline, so the reader cannot tell whether 74% is skill or just imbalance.
  • Most skip the class-imbalance discussion entirely (416 patients vs 167 non-patients; 441 male vs 142 female records), which silently inflates both accuracy and sensitivity estimates.
  • Deployment ethics — what a false negative versus a false positive means for a screening referral — is almost never discussed, and the default 0.5 threshold is left unexamined.
  • The gap: a protocol-clean, baseline-anchored, threshold-aware and ethics-framed evaluation that a B.Sc. student can reproduce end to end.

Proposed study

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.

Feasibility

  • Technical: 583 rows fit in memory; the full experiment grid runs in under two minutes on a laptop. scikit-learn, pandas and matplotlib are free and mature.
  • Economic: zero cost — the dataset is open and the tools are open-source.
  • Ethical and procedural: no new human data is collected, so no institutional ethics approval for human subjects is triggered; the dataset was published already anonymised under CC BY 4.0, and this study reports only aggregates. The two-semester CCF research slot fits the audit, modelling and writing phases with room for supervisor iteration.

Objectives

  1. 01Acquire the Indian Liver Patient Dataset from the UCI Machine Learning Repository and audit it for types, missing values (four missing A/G-ratio records), duplicates and licence terms.
  2. 02Maintain an ethics register documenting the anonymised, aggregate-only handling of the data and the explicit statement that the study is not a diagnostic tool.
  3. 03Establish a majority-class baseline so that every model's accuracy can be interpreted against the 416/167 class imbalance.
  4. 04Train logistic regression, decision tree, random forest, k-NN and SVM (RBF) classifiers under a leak-free protocol: stratified split, imputation and scaling fitted on training folds only.
  5. 05Evaluate all models with confusion matrices, precision, recall, specificity, F1, ROC-AUC and precision-recall curves on a held-out stratified test set.
  6. 06Analyse the sensitivity/specificity trade-off across decision thresholds and recommend an operating point suitable for a screening-first workflow.
  7. 07Deliver a fully reproducible notebook pipeline (fixed seeds, requirements file, generated figures) and an honest limitations chapter.

Scope

In scope

  • Secondary analysis of the public, anonymised ILPD (583 records, 10 features plus the selector label) exactly as distributed by UCI.
  • Classical, interpretable classifiers: majority-class baseline, logistic regression, decision tree, random forest, k-NN and SVM with an RBF kernel.
  • Protocol design: stratified 80/20 train/test split, 5-fold stratified cross-validation on the training portion, fixed random seeds.
  • Evaluation focused on confusion-matrix metrics, ROC-AUC and the threshold trade-off for screening use.
  • An ethics register and a limitations chapter (imbalance, gender skew, dataset geography and vintage).

Out of scope (and why)

  • Clinical deployment of any kind, individual risk scoring of real people, and any new collection of patient data — all would need approvals this study deliberately avoids.
  • Deep neural networks: with 583 rows they add tuning variance, not signal, and would weaken the interpretability argument.
  • Other datasets in the main study; an external validation dataset is listed as future scope.
  • Feature engineering beyond simple transforms, since the study's claim is about evaluation method, not leaderboard accuracy.

Methodology

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.

PhaseWeeksActivitiesDeliverable
Orientation1–3Literature study: ILPD papers, screening-metric theory, class-imbalance handling; write the research question and ethics register v1Research proposal, reading log
Data understanding4–7Download ILPD from UCI; audit types, missing A/G-ratio values, duplicates; EDA notebook with class, gender and feature distributionsData audit report, EDA notebook
Preparation8–10Preprocessing pipeline (median imputation, standardisation); stratified 80/20 split; leakage checklistPreprocessing module and protocol document
Modelling11–14Majority baseline plus five classifiers; 5-fold stratified CV on the training portion; hyperparameter grid kept small and justifiedTrained models, CV results table
Evaluation15–18Held-out test evaluation: confusion matrices, precision/recall/specificity/F1, ROC-AUC, PR curves; threshold sweep analysisResults chapter draft, threshold plot
Writing19–22Full dissertation draft; limitations chapter; reproducibility check from a clean environmentComplete draft
Review and defence23–24Supervisor corrections, final formatting, seminar and viva preparationFinal 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.

Study design

2 diagrams · 6 tools · 2 min read

  • Python
  • scikit-learn
  • pandas
  • NumPy
  • matplotlib
  • Jupyter Notebook

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"] --> D

The 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.

Work packages

6 packages

  1. Package 01

    Data Acquisition and Audit

    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.

  2. Package 02

    Exploratory Data Analysis

    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.

  3. Package 03

    Preprocessing and Split Protocol

    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.

  4. Package 04

    Baseline and Model Zoo

    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.

  5. Package 05

    Evaluation and Threshold Analysis

    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.

  6. Package 06

    Reporting and Reproducibility Pack

    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.

Slides

12 slides · titles free · bullets, notes and the .pptx unlock

  1. Slide 1

    Comparative Evaluation of Classifiers for Liver-Disease Screening

  2. Slide 2

    Why Screening Evaluation Is Different

  3. Slide 3

    The Dataset and Its Quirks

  4. Slide 4

    The Problem with Accuracy-Only Studies

  5. Slide 5

    Protocol: Leak-Free by Construction

  6. Slide 6

    Models Compared

  7. Slide 7

    Evaluation Metrics

  8. Slide 8

    Results: Cross-Validation and Test

  9. Slide 9

    Threshold Analysis for Screening

  10. Slide 10

    Ethics Register

  11. Slide 11

    Limitations

  12. Slide 12

    Conclusion and Future Scope

Bullets, speaker notes and the .pptx · ₹2,000

The titles above are the real outline. The rest is what you present from.

Unlock for ₹2,000

Viva questions & answers

3 of 14 answered free · 11 unlock

Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.

  1. 01Concept

    Why is accuracy a misleading metric for this dataset, and what would a model need to score just by guessing the majority class?

    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.

  2. 02Concept

    Explain precision and recall in the language of a liver screening camp.

    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.

  3. 03Concept

    What is ROC-AUC, and why did you also plot precision-recall curves?

    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

Try the free ones out loud first. Your examiner will not accept “it's in the PPT”.

How to reproduce the study

6 steps · unlocks with the project

Unlocks with the project · ₹2,000

6 steps

Every step to carry the project out with the tools in the tech stack, in order.

Unlock for ₹2,000

READMEFIRST

211 words · unlocks with the project

What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.

Unlocks with the project · ₹2,000

211 words · ~1 min read

The checklist of things to rename, re-seed and re-think so the project reads as yours.

Unlock for ₹2,000

Instructions

241 words · unlocks with the project

How to study it, adapt it and walk your examiner through it, step by step.

Unlocks with the project · ₹2,000

241 words · ~1 min read

Report structure, formatting rules and the submission checklist your department will grade.

Unlock for ₹2,000

References

6 sources

  1. UCI Machine Learning Repository — ILPD (Indian Liver Patient Dataset), 583 records, 10 features, CC BY 4.0
  2. scikit-learn documentation — model selection, pipelines, metrics (precision, recall, ROC-AUC)
  3. pandas documentation — data loading, cleaning and aggregation used in the audit and EDA
  4. NumPy documentation — numerical foundations used by the notebooks
  5. T. Fawcett, "An Introduction to ROC Analysis", Pattern Recognition Letters 27(8), pp. 861–874 (2006)
  6. I. H. Witten, E. Frank, M. A. Hall and C. J. Pal, Data Mining: Practical Machine Learning Tools and Techniques, 4th ed., Morgan Kaufmann (2016)

Cite this bundle

OnlyProjects. (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

Future scope

1 min read

  • External validation: rerun the same protocol on a second public liver or general clinical dataset to test whether the model ranking transfers.
  • Fairness analysis: the dataset is roughly 75% male; stratified evaluation by gender would quantify how the operating point shifts for female patients.
  • Cost-sensitive learning: replace the symmetric threshold sweep with explicit false-negative/false-positive costs.
  • Calibration: plot calibration curves so a referral score has probability meaning, not just a rank.
  • Explainability: permutation importance or Shapley values to show which liver-function markers drive each model's decisions, useful for clinician-facing reports.

Keep browsing

Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.