# blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis architecture

> Architecture diagram of the GitHub repository blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis
- Repository: https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis

## Overview

This repository presents a clinical machine-learning workflow for early liver-disease and cirrhosis prediction across multiple datasets. Its documented path runs from clinical data through preprocessing, model selection and training, calibration, thresholding, evaluation, explainability, and cross-dataset benchmarking. The README names CatBoost, TabNet, and Optuna and describes the other techniques, but no notebook source was provided; relationships below therefore reflect the README’s documented workflow, not inspected implementation calls.

Main entry points: [`final_year_project.ipynb`](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb) (Probability calibration), [`indian_liver_patient.csv`](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/indian_liver_patient.csv) (Indian Liver Dataset), [`HepatitisCdata.csv`](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/HepatitisCdata.csv) (Hepatitis C Dataset), [`Liver Patient Dataset (LPD)_train (1) (1) (1).csv`](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/Liver%20Patient%20Dataset%20(LPD)_train%20(1)%20(1)%20(1).csv) (Cirrhosis Dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Clinical datasets"]
  node_indian["Indian Liver Dataset"]
  node_hepatitis["Hepatitis C Dataset<br/>[HepatitisCdata.csv]"]
  node_cirrhosis["Cirrhosis Dataset"]
end

subgraph group_prep["Data preparation"]
  node_clean["Data cleaning"]
  node_impute["Missing value imputation"]
  node_encode["Encoding and scaling"]
  node_split["Train-test split"]
  node_balance["Class imbalance handling"]
end

subgraph group_models["Model development"]
  node_optuna["Optuna optimization"]
  node_catboost["CatBoost"]
  node_tabnet["TabNet"]
  node_calibration["Probability calibration"]
  node_threshold["Threshold optimization"]
end

subgraph group_analysis["Evaluation and interpretation"]
  node_metrics["Model evaluation"]
  node_benchmark["Cross-dataset benchmarking"]
  node_shap["SHAP explainability"]
  node_calmetrics["Calibration assessment"]
end

node_indian -->|"provides data"| node_clean
node_hepatitis -->|"provides data"| node_clean
node_cirrhosis -->|"provides data"| node_clean
node_clean -->|"cleans data"| node_impute
node_impute -->|"prepares features"| node_encode
node_encode -->|"transforms features"| node_split
node_split -->|"splits data"| node_balance
node_balance -->|"provides training data"| node_optuna
node_optuna -->|"optimizes"| node_catboost
node_optuna -->|"optimizes"| node_tabnet
node_catboost -->|"produces predictions"| node_calibration
node_tabnet -->|"produces predictions"| node_calibration
node_calibration -->|"calibrates probabilities"| node_threshold
node_threshold -->|"sets decision threshold"| node_metrics
node_metrics -->|"compares results"| node_benchmark
node_metrics -->|"explains predictions"| node_shap
node_calibration -->|"assesses reliability"| node_calmetrics

click node_indian "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/indian_liver_patient.csv"
click node_hepatitis "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/HepatitisCdata.csv"
click node_cirrhosis "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/Liver%20Patient%20Dataset%20(LPD)_train%20(1)%20(1)%20(1).csv"
click node_clean "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_impute "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_encode "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_split "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_balance "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_optuna "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_catboost "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_tabnet "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_calibration "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_threshold "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_metrics "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_benchmark "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_shap "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"
click node_calmetrics "https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_indian,node_hepatitis,node_cirrhosis toneBlue
class node_clean,node_impute,node_encode,node_split,node_balance toneAmber
class node_optuna,node_catboost,node_tabnet,node_calibration,node_threshold toneMint
class node_metrics,node_benchmark,node_shap,node_calmetrics toneRose
```

## Components

### Clinical datasets

- [Indian Liver Dataset](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/indian_liver_patient.csv): `indian_liver_patient.csv`
- [Hepatitis C Dataset](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/HepatitisCdata.csv): `HepatitisCdata.csv`
- [Cirrhosis Dataset](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/Liver%20Patient%20Dataset%20(LPD)_train%20(1)%20(1)%20(1).csv): `Liver Patient Dataset (LPD)_train (1) (1) (1).csv`

### Data preparation

- [Data cleaning](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Missing value imputation](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Encoding and scaling](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Train-test split](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Class imbalance handling](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`

### Model development

- [Optuna optimization](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [CatBoost](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [TabNet](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Probability calibration](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Threshold optimization](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`

### Evaluation and interpretation

- [Model evaluation](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Cross-dataset benchmarking](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [SHAP explainability](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`
- [Calibration assessment](https://github.com/blpk2005/multi-dataset-ml-framework-for-early-prediction-of-liver-cirrhosis/blob/main/final_year_project.ipynb): `final_year_project.ipynb`

## Connections

- Indian Liver Dataset → Data cleaning: provides data (evidence: `README.md`)
- Hepatitis C Dataset → Data cleaning: provides data (evidence: `README.md`)
- Cirrhosis Dataset → Data cleaning: provides data (evidence: `README.md`)
- Data cleaning → Missing value imputation: cleans data (evidence: `README.md`)
- Missing value imputation → Encoding and scaling: prepares features (evidence: `README.md`)
- Encoding and scaling → Train-test split: transforms features (evidence: `README.md`)
- Train-test split → Class imbalance handling: splits data (evidence: `README.md`)
- Class imbalance handling → Optuna optimization: provides training data (evidence: `README.md`)
- Optuna optimization → CatBoost: optimizes (evidence: `README.md`)
- Optuna optimization → TabNet: optimizes (evidence: `README.md`)
- CatBoost → Probability calibration: produces predictions (evidence: `README.md`)
- TabNet → Probability calibration: produces predictions (evidence: `README.md`)
- Probability calibration → Threshold optimization: calibrates probabilities (evidence: `README.md`)
- Threshold optimization → Model evaluation: sets decision threshold (evidence: `README.md`)
- Model evaluation → Cross-dataset benchmarking: compares results (evidence: `README.md`)
- Model evaluation → SHAP explainability: explains predictions (evidence: `README.md`)
- Probability calibration → Calibration assessment: assesses reliability (evidence: `README.md`)
