Skip to content

This repository contains an in-depth analysis of Liver Cirrhosis, focusing on identifying key clinical indicators and understanding the progression of the disease.

Notifications You must be signed in to change notification settings

Bushra-Butt-17/Liver-Cirrhosis-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

40 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation


๐Ÿฉบ Liver Cirrhosis Analysis

๐Ÿ“ Project Overview

This project provides an in-depth analysis of Liver Cirrhosis using clinical data. The objective is to explore the relationship between various biomarkers (e.g., Bilirubin, Copper, Alkaline Phosphatase) and patient demographics (e.g., Age, Sex) to understand the progression of the disease.

๐ŸŒŸ Highlights:

  • ๐Ÿ” Data Exploration: Visualizing clinical indicators of liver cirrhosis.
  • ๐Ÿ“Š Biomarker Comparisons: Analysis of biomarkers across different disease stages.
  • ๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘ Gender Differences: Exploring male and female variations in disease progression.
  • ๐ŸŽ‚ Age Trends: Statistical insights into age-related disease patterns.
  • ๐Ÿ’ก Survival Insights: Predicting survival rates and the likelihood of liver transplant for advanced stages.

๐Ÿ“š Table of Contents

  1. ๐Ÿ“ฅ Installation Instructions
  2. ๐Ÿ› ๏ธ Usage
  3. ๐Ÿ“Š Data Overview
  4. ๐Ÿงฎ Analysis
  5. ๐ŸŽจ Visualizations
  6. ๐Ÿ‘ฉโ€๐Ÿ’ป Contributors
  7. ๐Ÿ“œ License

๐Ÿ“ฅ Installation Instructions

โœ… Requirements:

  • Python 3.x
  • Required Libraries:
    • ๐Ÿ“ฆ pandas for data manipulation
    • ๐ŸŽจ matplotlib and seaborn for visualizations
    • ๐Ÿงฎ scipy and numpy for statistical computations

๐Ÿš€ Steps to Set Up:

  1. Clone the Repository

    git clone https://github.com/Bushra-Butt-17/Liver-Cirrhosis-Analysis.git
  2. Install Dependencies
    Navigate to the project directory and install all required libraries:

    cd Liver-Cirrhosis-Analysis
    pip install -r requirements.txt
  3. Run the Project
    Open the Jupyter Notebook or Python scripts:

    jupyter notebook

๐Ÿ› ๏ธ Usage

This project serves researchers, data scientists, and healthcare professionals by enabling them to:

  • Examine correlations between biomarkers and liver disease progression.
  • Predict outcomes like liver transplants or mortality.
  • Use the provided codebase for clinical or educational purposes.

๐Ÿ”ง How to Use:

  1. Load the dataset (ensure the correct file path).
  2. Follow the structured steps in the notebook for:
    • Data cleaning.
    • EDA.
    • Statistical analysis and visualizations.
  3. Interpret the outputs to draw meaningful insights.

๐Ÿ“Š Data Overview

The dataset contains clinical information for liver cirrhosis patients. Key columns include:

๐Ÿท๏ธ Feature ๐Ÿ“ Description
Age Patient's age.
Sex Gender (M/F).
Stage Stage of liver cirrhosis (1 to 4).
Bilirubin Serum Bilirubin levels (marker of liver function).
Copper Blood Copper levels (relevant for cirrhosis).
Alk_Phos Alkaline Phosphatase (enzyme indicating liver dysfunction).
Albumin Protein levels (lower levels suggest liver damage).
SGOT Serum Glutamic Oxaloacetic Transaminase (liver enzyme).
Platelets Platelet count (typically lower in cirrhosis).
Prothrombin Blood clotting time, impacted by liver function.

Sample Data:

Stage Age Sex Bilirubin Copper Alk_Phos SGOT Albumin Platelets Prothrombin
1 45 M 2.0 100 150 80 3.5 300,000 11.2
2 60 F 3.5 150 220 100 3.2 280,000 10.8

๐Ÿงฎ Analysis

๐Ÿ“‹ Exploratory Data Analysis (EDA)

EDA techniques include:

  • Descriptive statistics: Summary measures (mean, median, etc.).
  • Outlier detection.
  • Correlation analysis.

Sample Code:

# Calculate average biomarkers by gender
df.groupby('Sex')[['Age', 'Bilirubin', 'Copper']].mean()

๐Ÿ“ˆ Statistical Analysis

Advanced techniques to uncover patterns:

  • T-tests: Comparing biomarker levels between two groups.
  • ANOVA: Testing significant differences across multiple stages.
  • Survival Analysis: Predicting outcomes like mortality or transplants.

Example:

from scipy import stats
stage_1 = df[df['Stage'] == 1]['Bilirubin']
stage_3 = df[df['Stage'] == 3]['Bilirubin']
t_stat, p_value = stats.ttest_ind(stage_1, stage_3)
print(f"T-statistic: {t_stat}, P-value: {p_value}")

๐ŸŽจ Visualizations

Visualizations include:

  • ๐Ÿ“Š Stacked Bar Chart: Gender distribution across cirrhosis stages.
  • ๐Ÿงฎ Heatmap: Correlations between biomarkers.
  • ๐Ÿ“ฆ Boxplots: Variability of biomarkers by disease stage.

Sample Visualization Code:

import seaborn as sns
correlation_matrix = df[['Bilirubin', 'Copper', 'Alk_Phos']].corr()
sns.heatmap(correlation_matrix, annot=True, cmap='coolwarm')
plt.title('Biomarker Correlation Heatmap')
plt.show()

image

image

image

image

image

image

image

image

image


๐Ÿ‘ฉโ€๐Ÿ’ป Contributors

Feel free to contribute by:

  1. Reporting issues.
  2. Opening pull requests.
  3. Enhancing the analysis or visualizations.

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.


๐Ÿท๏ธ Tags:

Python Data Analysis Visualization Medical Research Statistical Analysis Seaborn Matplotlib Pandas

About

This repository contains an in-depth analysis of Liver Cirrhosis, focusing on identifying key clinical indicators and understanding the progression of the disease.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published