Medical Research Skills for Claude Code, Codex, Cursor & Copilot
58 项开源技能,覆盖完整的医学研究全生命周期。由医生构建,基于真实出版物测试。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Hourly ICU sepsis early-warning model scored on the official PhysioNet 2019 Challenge utility metric, with a live demo
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗A model that scores ICU patients every hour from routine vitals and labs and tries to flag sepsis up to 12 hours before onset.
Live demo | Write-up | Portfolio
It's trained on the PhysioNet 2019 Challenge data and scored with the Challenge's own utility metric.
I wanted to build something in healthcare and learn the tools along the way. The task, data and scoring all come from the 2019 PhysioNet/CinC Challenge paper (Reyna et al., cited at the bottom). It was a heavy task for a laptop. Mine kept breaking.
Live demo: replays held-out patients hour by hour and shows when the alert would have fired.
4,441 held-out patients, split by patient so none of them were seen in training. The alert threshold was picked by cross-validation on the training patients only.
| Metric | Value |
|---|---|
| Normalized utility (official Challenge metric) | 0.424 |
| AUROC / AUPRC (hourly) | 0.817 / 0.092 |
| Septic patients flagged in the useful window (−12h to +3h of onset) | 370 / 398 (93%) |
| Median warning before onset, among those flagged | 12 h |
| Non-septic patients with at least one alarm | 2,381 / 4,043 (59%) |
| Septic patients who also alarmed before the useful window | 271 / 398 (68%) |
Read the last two rows before the first four. The model catches most septic patients partly because it alarms on a lot of people. The 12h median is also the most the window allows: many of those patients were already alarming when the window opened.
The threshold cross-validation picked (0.32) sits at the peak of the test curve.
flowchart LR
A[".psv files<br/>one row per ICU hour"] --> B["load.py"]
B --> C["features.py<br/>causal features"]
C --> D["train.py<br/>patient split,<br/>CV-tuned threshold"]
D --> M[("model.joblib")]
D --> E["evaluate.py<br/>utility, AUROC, lead time"]
M --> F["app.py<br/>FastAPI POST /score"]
F --> G["build_pages.py<br/>pre-scores demo patients"]
G --> H["GitHub Pages"]
Python 3.13, pandas, scikit-learn's HistGradientBoostingClassifier, FastAPI,
a plain JS demo page, pytest, ruff, Docker, GitHub Actions.
Choices that matter:
compute_prediction_utility, copied
unchanged into src/sepsis_utility.py. It gives the most credit for alerts
6 to 12h before onset, penalizes late or missed cases hard, and charges 0.05
for every false-alarm hour.tests/test_features.py appends and corrupts future
hours and checks that nothing earlier changes.make setup # pinned dependencies
make run # demo + API at http://localhost:8000
make test
make lint
Without make (plain Windows, for example):
pip install -r requirements-dev.txt
export PYTHONPATH=src # PowerShell: $env:PYTHONPATH="src"
uvicorn app:app --app-dir src --reload
pytest -q
The trained model (artifacts/model.joblib) is committed, so the demo runs
without training anything.
To reproduce the results, download the Challenge training data (open access, CC BY 4.0) from https://physionet.org/content/challenge-2019/1.0.0/, then:
python src/train.py --data training_setA # ~15 min
python src/evaluate.py
python scripts/export_demo.py # picks the demo patients
python scripts/make_figures.py
python data/make_sample.py followed by python src/train.py runs the whole
pipeline on synthetic patients in the real schema, no download needed. The
scores it prints are near-perfect and mean nothing.
POST /score takes one patient's hourly rows with the Challenge column names.
Interactive docs are at /docs when running locally.
curl -X POST localhost:8000/score -H "Content-Type: application/json" \
-d '{"records": [{"ICULOS": 1, "HR": 92, "Temp": 38.4, "Resp": 24},
{"ICULOS": 2, "HR": 104, "MAP": 63, "Lactate": 2.9}]}'
The response has hourly_risk, threshold, first_alert_hour and a
recommendation string. ICULOS is required, an integer ≥ 1 and unique per
row. Every measurement is optional. Unknown fields get a 422, so a typo like
"hr" can't quietly be scored as "never measured". Empty payloads and more
than 2,000 rows are rejected too.
The live demo is static. scripts/build_pages.py runs each demo patient
through the real /score endpoint at build time and saves the responses next
to the page, so the numbers on the site come from the committed model. CI
(ruff, tests, a Docker smoke test) has to pass on main before
.github/workflows/pages.yml publishes it.
I tried Hugging Face Spaces first, but Docker Spaces need a paid plan now. The Dockerfile still works on any host that sets $PORT (Render, Fly.io,
Cloud Run) if you want the live API. Don't point it at real patient data: that
needs authentication, audit logging and a hospital network.
src/config.py the 40-column Challenge schema and shared constants
src/load.py read per-patient .psv files
src/features.py causal feature engineering
src/train.py training, CV threshold tuning
src/evaluate.py utility and lead-time report
src/sepsis_utility.py the Challenge's metric (see NOTICE.md)
src/app.py FastAPI scorer + demo page
src/static/ demo page and 7 held-out demo patients
scripts/ demo-patient export, README figures, Pages build
tests/ causality, metric, loader and API tests
data/make_sample.py synthetic patients in the real schema
PhysioNet/CinC Challenge 2019 data, CC BY 4.0. Full citations and the metric's license are in NOTICE.md.
Reyna MA, et al. Early Prediction of Sepsis From Clinical Data: The PhysioNet/Computing in Cardiology Challenge 2019. Critical Care Medicine 48(2):210-217 (2020).