A Machine Learning Application for Predicting Mortality Risk in ICU Patients
DeepRiskICU is a web application designed to provide rapid, accurate, and interpretable mortality risk predictions for patients in the Intensive Care Unit (ICU) within the first 24 hours of admission. Built for healthcare providers, the application enables fast clinical decision-making and optimal resource allocation using validated machine learning models.
- User-friendly web interface (Django-based)
- Predicts ICU mortality risk using XGBoost (default) and neural network models
- Utilizes features derived from the MIMIC-III dataset: demographics, clinical notes, prescriptions, and more
- Results available immediately for real-time use
- Secure data storage and user authentication
- Backend: Django (Python)
- ML Models: XGBoost (default), neural classifier (PyTorch)
- Frontend: Django templating (HTML)
- Data Processing: ClinicalBERT embeddings, PCA, standard ML preprocessing
- Database: SQLite (default, configurable)
- Containerization: Docker support (optional)
ml-training/— Notebooks and scripts for data preprocessing, feature engineering, model training, and evaluationtriage_app/— Django web application: web interface, user auth, ML inference, static files, templatesrequirements.txt— Python dependenciesDeepRiskICU - A Machine Learning Application for Predicing Mortality Risk in ICU Patients.pdf— Research paper and validation details
- Python 3.9+
- pip
- (Optional) Docker
- Clone the repository:
git clone <repo-url> cd DeepRiskICU
- Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate - Install dependencies:
pip install -r requirements.txt
- (Optional) For Dockerized deployment, see Docker instructions.
- Navigate to the Django app directory:
cd triage_app - Run database migrations:
python manage.py migrate
- Create a superuser for admin access:
python manage.py createsuperuser
- Start the development server:
python manage.py runserver
- Access the app at http://localhost:8000
- Log in, enter patient data, and receive a real-time mortality risk prediction.
- Trained models are stored in
ml-training/models/and loaded by the web app for inference. - Retrain or update models using the provided notebooks/scripts as needed.
- User authentication and role-based access (providers, admins)
- Secure data entry and storage
- Fast inference with state-of-the-art ML models
- Audit trail: input data and predictions are logged for monitoring and future model improvement
- Extensible: add new features, models, or data sources as needed
- To use PostgreSQL or another database, update the Django
settings.pyfile intriage_app/triage_app/.
- Use Gunicorn and Nginx for production deployment.
- Docker support is available via the provided
Dockerfile. - Ensure compliance with privacy regulations (e.g., HIPAA, GDPR) when handling real patient data.
- Retrain models using the notebooks in
ml-training/and replace the model files used by the web app.long-context.ipynbis the latest version of the model training notebook.
- Contributions are welcome! Please open issues or submit pull requests for code, models, or documentation.
- See CONTRIBUTING.md for guidelines (if available).
- This project is licensed under the MIT License. See the LICENSE file for details.
- If you find this project helpful, feel free to acknowledge it in your work or portfolio, but no formal citation is required.
- MIMIC-III database
- Font Awesome for icons (see
triage_app/staticfiles/admin/img/README.txt) - ClinicalBERT, XGBoost, PyTorch, Django, and all supporting open-source libraries
For questions or support, please open an issue or contact the repository maintainer.