- Overview
- Interface
- Features
- Model Details
- Prerequisites
- Installation
- Development Setup
- Local Execution
- Deployment
- Testing
- License
Machine learning-based web application designed to assess stroke risk based on health and lifestyle factors. The system processes patient data through a CatBoost model to provide risk assessments, helping healthcare professionals identify potential stroke risks early for timely intervention.
- Comprehensive health data analysis
- Advanced feature engineering implementation
- Multiple model evaluation framework
- High-recall optimization
- Flask-based web interface
- Google Cloud Platform deployment
- Automated testing suite
- Containerized deployment
Current implemented models evaluated:
- Logistic Regression
- XGBoost
- CatBoost (selected as final model)
- Python 3.9+ (check
.python-versionfile for the current required version) - Docker
- Google Cloud SDK
- Flask
- scikit-learn
- CatBoost
-
Install uv:
# On Unix/macOS curl -LsSf https://astral.sh/uv/install.sh | sh # On Windows (PowerShell) irm https://astral.sh/uv/install.ps1 | iex
-
Clone the Repository:
git clone https://github.com/vytautas-bunevicius/stroke-risk-predictor.git cd stroke-risk-predictor -
Install Dependencies and Set Up Virtual Environment:
uv sync
This command creates a virtual environment and installs all dependencies from
pyproject.toml. -
Activate the Virtual Environment:
source .venv/bin/activate # On Unix/macOS # or .venv\Scripts\activate # On Windows
-
Clone the Repository:
git clone https://github.com/vytautas-bunevicius/stroke-risk-predictor.git cd stroke-risk-predictor -
Create and Activate a Virtual Environment:
python -m venv venv source venv/bin/activate # On Unix/macOS # or venv\Scripts\activate # On Windows
-
Install Dependencies:
pip install -e .
-
Create
.envfile in project root:FLASK_ENV=development MODEL_PATH=models/catboost_model.pkl PORT=5000
-
Configure Google Cloud services:
- App Engine
- Cloud Storage (for model storage)
- Secret Manager
Run the application locally:
python src/stroke_risk_predictor/app.pyVisit http://localhost:5000 in your browser.
The application is deployed on Google Cloud Platform App Engine:
-
Configure deployment:
gcloud config set project your-project-id -
Deploy:
gcloud app deploy
Run the test suite:
python -m pytest tests/This project is released under the Unlicense. This means you can copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
See the UNLICENSE file for more details.
