A Machine Learning Framework for Hepatic Health Analysis: Multi-Class Liver Disease Classification with Hepatitis Sub-Typing and Web-Based Decision Support

Digital Transformation and Technology Dynamics

Md. Ashraful Islam Albi, Md Shahadat Hossain Shishir

Daffodil International University, Dhaka, Bangladesh; World University of Bangladesh

Digital Transformation and Technology DynamicsVol. 5, Issue 2November 17, 2025

View Full PDF

Abstract

Liver disease is among the leading contributors to global morbidity and mortality, and its early stages are frequently asymptomatic, so diagnosis often occurs only once damage is advanced. Confirmatory investigation still relies on imaging and biopsy, which are costly, invasive and scarce in low-resource settings, while routine biochemical panels require expert interpretation that is not uniformly available. This paper presents a machine learning framework for hepatic health analysis that classifies liver conditions from routine clinical and biochemical markers and, where hepatitis is indicated, resolves the case to a specific sub-type. The source data is an open Kaggle liver-patient collection of roughly 30,000 records containing age, gender, total and direct bilirubin, alkaline phosphatase, AST (SGOT), ALT (SGPT), total proteins, albumin and the albumin-to-globulin ratio. A preprocessing pipeline covering missing-value imputation, outlier removal, categorical encoding and feature scaling reduced the corpus to approximately 20,000 analyzable records. A clinically grounded rule set assigned each record to one of six classes — Hepatitis, Cirrhosis, Fatty Liver (NAFLD), Cholestasis, Healthy and Uncertain — and a second rule layer resolved hepatitis cases into Acute Viral (A/E), Chronic Hepatitis B, Hepatitis C, Alcoholic Hepatitis, Autoimmune Hepatitis and NASH. Random Forest, KNearest Neighbours, a Support Vector Classifier and a Voting ensemble were trained and compared under a stratified split. The Voting Classifier produced the highest and most balanced performance at 99% accuracy, followed by K-Nearest Neighbours at 98% and Random Forest at 97%, while the Support Vector Classifier reached only 65%. The validated model is deployed as a Streamlit web application that returns a disease class and, where applicable, a hepatitis sub-type in real time, with input guidance for each condition. The paper also sets out the conditions under which the reported figures should be read, in particular the dependence of the labels on the same biochemical thresholds the classifiers learn from.

Keywords

Machine learning in healthcareLiver disease predictionHepatitis sub-classificationEnsemble learningVoting ClassifierRandom ForestClinical decision supportBiochemical markersRule-based labellingStreamlit deployment

Article Information

Published
November 17, 2025
Journal
Digital Transformation and Technology Dynamics
Volume / Issue
5 / 2
Article No.
DTTD-2025005
Year
2025

Browse

All published articles · Journal archive