An open API service indexing awesome lists of open source software.

https://github.com/shervinnd/blood-donor-availability-predictor

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! πŸ©ΊπŸ’‰
https://github.com/shervinnd/blood-donor-availability-predictor

binary-classification blood-donation blood-donor-prediction data-preprocessing deep-learning healthcare-ai machine-learning medical-data-analysis neural-network predictive-modeling python roc-curve scikit-learn tensorflow

Last synced: 8 months ago
JSON representation

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! πŸ©ΊπŸ’‰

Awesome Lists containing this project

README

          

# 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:

``` bash
git clone https://github.com/shervinnd/blood-donor-predictor.git
cd blood-donor-predictor
```

2. Install dependencies:

``` bash
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:

``` bash
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](LICENSE) file for details.

## πŸ“§ Contact

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

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