- HopeCast is an AI-powered web application that predicts breast cancer survival time using clinical, genetic, and mutation data.
- It also provides personalized treatment explanations by retrieving information from real medical literature.
- The project integrates classical ML (XGBoost), deep learning (DeepSurv), and a Retrieval-Augmented Generation (RAG) system for explainability.
- Predicting survival using clinical, genetic and mutation data
- Comparing performance between Naive, XGBoost, and DeepSurv models
- Understanding predictions with RAG-powered explanations using real PubMed research
- User-friendly interface built with Streamlit
- Choose a dataset (Clinical, Genetic, or Mutation)
- Enter patient details like age, tumor stage, and treatment history
- The model predicts:
- Median survival time
- Survival probability at different months
- A Retrieval-Augmented Generation (RAG) system is used to:
- Search for relevant articles from PubMed
- Extract meaningful medical content
- Generate clear, personalized treatment explanations using a language model (via Grok API)
| Dataset | Naive Baseline | XGBoost | DeepSurv |
|---|---|---|---|
| Clinical | 0.5000 | 0.6001 | 0.7135 |
| Genetic | 0.5000 | 0.6513 | 0.6730 |
| Mutation | 0.5000 | 0.5687 | 0.5611 |
https://hopecast-service-1004867270011.us-central1.run.app/
git clone https://github.com/johnjoel2001/HopeCast.git
cd HopeCastpython -m venv venv
source venv/bin/activatepip install -r requirements.txtCreate a .env file in the project root with:
XAI_API_KEY=your_openai_or_grok_api_key
ENTREZ_EMAIL=your_email@example.compython scripts/make_dataset.py
python scripts/clean_data.pyNaive Baseline
python scripts/naive_model.pyXGBoost
python scripts/non_deep_learning.pyDeepSurv
python scripts/deep_learning.pystreamlit run app.py-
HopeCast is a research tool, not a clinical decision system
-
All data is anonymized and sourced from METABRIC (public)
-
Explanations are generated from open-access PubMed literature
-
Built to support, not replace medical professionals
-
METABRIC Dataset (via Kaggle)
-
DeepSurv (Katzman et al., 2018)
-
xAI Grok API
-
PubMed/NCBI Entrez
-
FAISS, Lifelines, PyCox, Streamlit, and other open-source libraries