LW-LSTM based Hepatitis Prediction Prognosis using Lightweight Long Short Term Memory Networks
Hepatitis is a serious liver disease that can lead to severe health complications, including liver failure and death if not diagnosed and treated early. With the increasin...
About This Product
LW-LSTM Based Hepatitis Prediction Prognosis using Lightweight Long Short-Term Memory Networks
1. Introduction
Hepatitis is a serious liver disease that can lead to severe health complications, including liver failure and death if not diagnosed and treated early. With the increasing availability of healthcare data, machine learning and deep learning techniques have become essential tools for disease prediction and prognosis.
Traditional clinical diagnosis relies heavily on laboratory tests and expert interpretation, which may be time-consuming and prone to human error. Therefore, intelligent automated systems are required to assist medical professionals in making faster and more accurate decisions.
In recent years, deep learning models—especially Long Short-Term Memory (LSTM) networks—have demonstrated strong capabilities in handling sequential and complex data patterns. However, conventional LSTM models can be computationally expensive.
To address this, this work proposes a Lightweight Long Short-Term Memory (LW-LSTM) model that efficiently predicts hepatitis patient outcomes (Live or Die) while maintaining high accuracy and reduced computational complexity.
2. Problem Statement
Hepatitis prediction poses several challenges:
- Medical datasets often contain missing and noisy values
- Data imbalance between survival and death cases
- Presence of both categorical and numerical features
- Need for efficient and lightweight models
- Accurate prognosis is critical for patient survival
This work aims to develop a lightweight deep learning model that can handle these challenges effectively.
3. System Overview
The proposed LW-LSTM system consists of the following stages:
- 1. Dataset loading
- 2. Data analysis and visualization
- 3. Data balancing (oversampling)
- 4. Data preprocessing
- 5. Feature scaling
- 6. Dataset splitting
- 7. Model training (LW-LSTM)
- 8. Model evaluation
- 9. Prediction
4. Input and Output Specifications
Input
Patient clinical attributes:
- o Age, Sex
- o Symptoms (fatigue, malaise, anorexia, etc.)
- o Medical indicators (bilirubin, albumin, SGOT, etc.)
Output
Binary classification:
- o 0 → LIVE
- o 1 → DIE
Prediction probability score
5. Methodology
Step 1: Dataset Loading
The dataset is obtained using KaggleHub:
- Dataset: Hepatitis dataset
- Contains patient records with clinical features and survival status
Step 2: Data Analysis
Exploratory Data Analysis (EDA) is performed using:
- Bar charts (class distribution)
- Pie charts (percentage distribution)
This helps identify class imbalance and feature characteristics.
Step 3: Data Balancing
To handle imbalance:
- Oversampling is applied using resampling technique
- Each class is balanced to equal size
This ensures unbiased learning.
Step 4: Data Preprocessing
Data preprocessing includes:
Encoding categorical variables:
o Sex → male (1), female (0)
Converting boolean features to binary (1/0)
Handling missing values:
- o Numerical → median
- o Categorical → mode
This step ensures clean and consistent input data.
Step 5: Feature Scaling
- StandardScaler is applied
- Ensures all features are on the same scale
Step 6: Dataset Splitting
- Training set: 80%
- Testing set: 20%
- Stratified sampling used for balance
Step 7: LW-LSTM Model Training
Architecture Components
- LSTM Layer (32 units) Captures relationships in feature patterns
- Dropout Layer (0.2) Prevents overfitting
- Dense Layer (16 neurons, ReLU) Learns complex feature interactions
- Output Layer (Sigmoid) Produces binary classification
Training Configuration
- Loss Function: Binary Crossentropy
- Optimizer: Adam
- Metrics: Accuracy
- Epochs: 10
- Batch Size: 32
Step 8: Model Evaluation
The model is evaluated using:
- Accuracy
- Precision
- Recall
- F1 Score
- Specificity
- Error Rate
- ROC-AUC Score
- Confusion Matrix
These metrics ensure robust performance evaluation.
Step 9: Prediction
Prediction workflow:
- 1. Load trained model and scaler
- 2. Input new patient data
- 3. Apply preprocessing
- 4. Scale features
- 5. Reshape for LSTM
- 6. Generate prediction
Output:
- Probability score
- Final class:
o LIVE
o DIE
6. Expected Outcomes
The LW-LSTM model is expected to:
- Achieve high prediction accuracy
- Handle imbalanced datasets effectively
- Reduce false predictions
- Provide fast and lightweight computation
- Assist doctors in decision-making
7. Conclusion
This work presents a Lightweight LSTM-based hepatitis prediction system for medical prognosis. By integrating preprocessing, data balancing, and an efficient LSTM architecture, the model successfully predicts patient survival outcomes.
The proposed system can be applied in:
- Clinical decision support systems
- Hospital management systems
- Early disease prognosis tools
It provides a reliable and efficient approach for improving healthcare analytics.
7. References
1.Hochreiter, S., & Schmidhuber, J. (1997). Long Short-Term Memory
2.Chollet, F. (2015). Keras Deep Learning Framework
3.Pedregosa et al. (2011). Scikit-learn: Machine Learning in Python
Python
Django
HTML
CSS
No reviews available for this product.