relsa-severity-assessment
它能做什么
这个工具可以把研究中动物的多项福利指标(如体重、体温和其他迹象)综合成一个总分,用来概括动物的福利状况。它还能预测这个福利分数未来可能如何变化。
适用场景
- ✓把多个福利指标(体重、体温等)合并成一个总分。
- ✓预测某只动物是否可能到达福利的临界点。
- ✓比较不同动物组或处理组之间的福利状况。
技能链接
https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/relsa-severity-assessment/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“帮我计算这些动物的福利分数,综合体重、体温和临床评分,并预测未来 3 天的分数。”
每周 5 个新技能,1 分钟读完。
工作原理
工具会把每只动物的测量值与参照组进行比较,看它们偏离正常水平有多远。它使用一种名为 RELSA 的方法生成综合分数,并使用 ARIMA 方法进行预测。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
RELSA severity assessment and exploratory score forecasting
Overview
This skill computes reference-relative multivariate scores and exploratory ARIMA forecasts.
It targets the equations and printed example of RELSA 0.0.1.9000
(commit e68e8451e8719ccc3600179f55900cd7254ede9d, current upstream at review), plus the
published foRcast methodology.
The Python forecast helper is an independent nonseasonal approximation, not an exact R port.
RELSA is the RMS of directional deviations divided by each variable's reference maximum deviation. Zero means no measured worsening in those directions; it does not establish normal welfare. One is a reference scale unit, not a universal endpoint or an upper bound. Different variables may attain their reference extrema in different animals or at different times, so the reference cohort need not contain a score of exactly one.
Forecasts estimate a score at a specified time, not time-to-endpoint or probability of death. Keep the approved study's observation schedule and humane endpoint criteria separate from these exploratory outputs. See Boundaries.
When to use this skill
- Combining weight loss, temperature, clinical scoring, biomarkers, or telemetry into a single per-animal severity score
- Asking which animals in a cohort are at risk of reaching a humane endpoint, or predicting the severity score at a coming time point
- Comparing severity between treatment groups, interventions, or animal models on a common relative scale
- Defining thresholds or zones on a severity scale from the data
- Writing the severity-assessment section of an animal welfare report, a 3Rs/refinement analysis, or an application under EU Directive 2010/63/EU
For general forecasting of a time series that is not a severity score, use timesfm-forecasting or statsmodels. For study design and sample size, use experimental-design and statistical-power.
Installation
uv venv --python 3.13 .venv-relsa
uv pip install --python .venv-relsa/bin/python numpy==2.5.3 pandas==3.0.6 scipy==1.18.1 statsmodels==0.15.0 matplotlib==3.11.2
source .venv-relsa/bin/activate
Run the examples from this skill directory. relsa_score.py needs numpy/pandas;
kde_thresholds.py additionally needs scipy; statsmodels is required
for forecasting and matplotlib only for figures.
Data format
One row per animal per time point, in a CSV:
| id | treatment | condition | day | temp | weight | score | il6 |
|---|---|---|---|---|---|---|---|
| M01 | treated | endpoint | -1 | 37.15 | 25.17 | 0 | 35.1 |
| M01 | treated | endpoint | 0 | 37.26 | 25.25 | 0 | 39.5 |
| M01 | treated | endpoint | 1 | 35.83 | 23.12 | 4 | 162.0 |
idand a time column (day,time,hour, …) are required;treatmentandconditionare optional labels used for grouping and for selecting the reference set.- Time must be finite, with one consistent unit and origin across cohorts. Forecast training and
target times must align with the chosen regular grid; disable interpolation only on regular observations. The RELSA
convention codes the baseline time point as
-1. - One row per animal per time point. Average hourly telemetry to one value per interval first (the published models average heart rate, HRV, and temperature, and sum activity).
- Preserve lexical animal IDs (including leading zeros). Duplicate IDs/times, nonnumeric measurements and infinities are rejected. Leave missing measurements empty. They are dropped from the score, never imputed — a missing value treated as "no deviation" biases severity downward.
assets/example_cohort.csv is a small synthetic cohort (6 mice, 9 days, temperature, body
weight, an 0–8 clinical score, and an IL-6-like biomarker) used by every command below, so
each one is runnable as written.
The four decisions that determine the result
Make these explicitly and write them into the methods. Nothing else about the procedure matters as much.
1. Directionality — which variables rise under worsening? Falling is the default (body
weight, activity, food intake, burrowing, wheel running). Variables that rise must be
declared as --turned: clinical scores, inflammatory biomarkers, fever, tachycardia. Get
this wrong and the variable contributes nothing at all, silently, because deviations in the
…
常见问题
RELSA 分数是什么意思?
RELSA 分数是一个相对指标。0 分表示相对于参照组没有观察到恶化。1 分是参照尺度上的一个单位,而不是上限。
预测结果能显示动物什么时候会死亡吗?
不能。预测结果估计的是未来某个时间点的严重程度分数,而不是到达终点的时间,也不是死亡概率。
工具怎么知道哪些指标代表病情恶化?
你需要告诉工具,某个指标应该是升高(如体温)还是降低(如体重)才代表恶化。如果这个方向设置错误,该指标就不会计入总分。
详情
作者的原始描述
Supports multivariate severity assessment and exploratory endpoint-time score forecasting for laboratory animal studies using the RELSA (RELative Severity Assessment) score and ARIMA-based foRcast forecasting. Use when combining welfare readouts — body weight or weight loss, body temperature, clinical or nesting scores, biomarkers, activity, heart rate, burrowing, wheel running — into one severity
热度
- GitHub 星标
- 51k
- 排名
- #3555
- 许可证
- MIT
- 更新时间
- 2026/10/15
评论
- …