Skip to content

This project builds a machine learning model to predict the survival of patients with hepatitis based on clinical and demographic features. It includes data preprocessing, training classification algorithms, evaluating model performance, and saving the final model for deployment.

Notifications You must be signed in to change notification settings

FAHAD-ALI-github/MACHINE-LEARNING-PROJECT--Hepatitis-Prediction-Model

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Hepatitis Prediction using Machine Learning

This project predicts the likelihood of survival in hepatitis patients using a Machine Learning model trained on real medical data. It is built using Python, Jupyter Notebook, and Scikit-learn.

๐Ÿ“ Files in this Repository

  • hepatitis.csv - Dataset containing medical records of hepatitis patients.
  • hepatitis_prediction_project.ipynb - Jupyter Notebook with data cleaning, exploration, model training, and evaluation.
  • 02_model_hapitits.pkl - Trained ML model saved using pickle.

๐Ÿงช Tech Stack

  • Python
  • Pandas, NumPy
  • Scikit-learn
  • Jupyter Notebook
  • Pickle (for model serialization)

โœ… What this Project Covers

  • Data preprocessing (handling missing values, encoding, etc.)
  • Exploratory Data Analysis (EDA)
  • Model training using Logistic Regression
  • Model evaluation using accuracy score
  • Model export for future use

๐Ÿ“Š Dataset Info

The dataset contains several features like:

  • Age
  • Sex
  • Steroid
  • Liver size
  • Bilirubin level
  • And other medical indicators

The target is to predict whether the patient lives (1) or dies (2).

๐Ÿ“ˆ Model Performance

  • Model Used: Logistic Regression
  • Accuracy: ~85% (can vary depending on preprocessing)

๐Ÿš€ How to Run

  1. Clone the repository
  2. Install dependencies:
    pip install pandas numpy scikit-learn jupyter
  3. Open the notebook:
    jupyter notebook hepatitis_prediction_project.ipynb

๐Ÿ”ฎ Future Improvements

  • Use more advanced models (e.g., Random Forest, XGBoost)
  • Deploy the model using Flask or FastAPI
  • Build a small frontend interface

๐Ÿ‘จโ€๐Ÿ’ป Author

Fahad Ali โ€“ Full Stack Developer | Python | Django | React | DRF | Exploring AI/ML
GitHub Linkedin


๐Ÿ“Œ This project is a part of my learning journey into Data Science and Machine Learning.

About

This project builds a machine learning model to predict the survival of patients with hepatitis based on clinical and demographic features. It includes data preprocessing, training classification algorithms, evaluating model performance, and saving the final model for deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published