Skip to content

A deep learning model to predict blood donor availability using TensorFlow and sklearn. Features data preprocessing, neural network training, and ROC curve visualization. Achieve high accuracy in predicting donor status! πŸ©ΊπŸ’‰

License

Notifications You must be signed in to change notification settings

shervinnd/Blood-Donor-Availability-Predictor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Blood Donor Availability Predictor πŸ©ΊπŸ’‰

Welcome to the Blood Donor Availability Predictor project! This repository contains a deep learning model built with TensorFlow to predict whether blood donors are available to donate based on their donation history and blood group. πŸš€

πŸ“– Project Overview

This project uses a neural network to classify blood donors as available (Yes) or unavailable (No) for donation. The dataset includes features like months since first donation, number of donations, pints donated, and blood group. The model is trained with advanced techniques like batch normalization, dropout, and learning rate scheduling to achieve high accuracy. πŸ“Š

Key Features

  • Data Preprocessing: Handles categorical data (blood group) with label encoding and scales numerical features. πŸ› οΈ
  • Neural Network: A deep learning model with multiple layers, batch normalization, and dropout for robust predictions. 🧠
  • Evaluation: Includes accuracy metrics and ROC curve visualization for model performance. πŸ“ˆ
  • Visualization: Plots ROC curves to assess the model's discriminatory power. 🎨

πŸ› οΈ Installation

To run this project, ensure you have Python 3.8+ installed. Follow these steps:

  1. Clone the repository:

    git clone https://github.com/shervinnd/blood-donor-predictor.git
    cd blood-donor-predictor
  2. Install dependencies:

    pip install -r requirements.txt
  3. Ensure you have the dataset (blood_donor_dataset.csv) in the project directory.

πŸ“‹ Requirements

  • pandas
  • numpy
  • scikit-learn
  • tensorflow
  • matplotlib

Install them using:

pip install pandas numpy scikit-learn tensorflow matplotlib

πŸš€ Usage

  1. Prepare the Dataset: Place blood_donor_dataset.csv in the project root.
  2. Run the Notebook: Open donor.ipynb in Jupyter Notebook or Google Colab.
  3. Train the Model: Execute the cells to preprocess data, train the model, and evaluate predictions.
  4. Visualize Results: Check the ROC curve and prediction comparisons in the output.

πŸ“Š Model Details

  • Input Features:
    • months_since_first_donation
    • number_of_donation
    • pints_donated
    • blood_group (encoded)
  • Target: availability (Yes/No)
  • Architecture:
    • Dense layers: 256, 128, 64, 32 units with ReLU activation
    • Batch normalization and dropout for regularization
    • Sigmoid output for binary classification
  • Training:
    • Optimizer: Adam (learning rate = 0.001)
    • Loss: Binary Crossentropy
    • Epochs: 200 with early stopping and learning rate reduction

πŸ“ˆ Results

The model achieves high accuracy on the test set, with detailed predictions compared to actual values. The ROC curve visualizes the trade-off between true positive and false positive rates, with AUC indicating model performance. πŸ“‰

🀝 Contributing

Contributions are welcome! Feel free to: - Open issues for bugs or feature requests πŸ› - Submit pull requests with improvements πŸ”§ - Suggest enhancements to the model or preprocessing pipeline 🌟

πŸ“œ License

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

πŸ“§ Contact

For questions or feedback, reach out via GitHub Issues or email at shervindanesh8282@gmail.com

Happy coding and predicting! πŸš€πŸ©Ί

About

A deep learning model to predict blood donor availability using TensorFlow and sklearn. Features data preprocessing, neural network training, and ROC curve visualization. Achieve high accuracy in predicting donor status! πŸ©ΊπŸ’‰

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published