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! π©Ίπ
- Host: GitHub
- URL: https://github.com/shervinnd/blood-donor-availability-predictor
- Owner: shervinnd
- License: mit
- Created: 2025-08-24T15:22:05.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-08-24T15:38:01.000Z (9 months ago)
- Last Synced: 2025-09-03T05:20:02.739Z (9 months ago)
- Topics: 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
- Language: Jupyter Notebook
- Homepage:
- Size: 58.6 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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! ππ©Ί