pymc-bayesian-modeling
使用 PyMC 构建贝叶斯模型
贝叶斯建模需要谨慎设置先验、诊断和模型检查。此技能指导从模型设置到后验验证与比较的 PyMC 工作流。
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "pymc-bayesian-modeling" from https://skillstore.io/skills/davila7-pymc-bayesian-modeling.md and its manifest at https://skillstore.io/api/skills/davila7-pymc-bayesian-modeling/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“pymc-bayesian-modeling”。 用户有分组观测数据,并希望按组进行部分池化。
预期结果:
- 推荐了带有组级截距和非中心化参数化的层级模型。
- 定义了采样前的先验预测检查。
- 列出了在解释组效应之前需要验证的诊断项。
正在使用“pymc-bayesian-modeling”。 用户有几个已拟合模型,并希望选择其中一个。
预期结果:
- 建议在启用对数似然的情况下进行 LOO 比较。
- 解释了如何检查 Pareto-k 警告。
- 建议当差异相对于不确定性较小时使用模型平均。
正在使用“pymc-bayesian-modeling”。 用户在采样后看到发散和较低的有效样本量。
预期结果:
- 解释了可能的后验几何问题。
- 建议提高 target_accept、使用更强的先验并重新参数化。
- 建议在报告结果前重新运行诊断。
安全审计
中风险All 110 static findings are false positives caused by Markdown formatting, dictionary keys, or Bayesian terminology. No command execution or reconnaissance behavior was found, but the documented pickle.load example creates a medium-risk unsafe deserialization concern.
已确认安全问题 (1)
风险因素
📁 文件系统访问 (1)
⚙️ 外部命令 (50)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/davila7-pymc-bayesian-modeling/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/davila7-pymc-bayesian-modeling?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/davila7-pymc-bayesian-modeling?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/davila7-pymc-bayesian-modeling/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/davila7-pymc-bayesian-modeling.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
davila7. (2026). pymc-bayesian-modeling security audit report (audit version 9) [Author version unspecified]. Skillstore. https://skillstore.io/skills/davila7-pymc-bayesian-modeling/audits/9BibTeX 引用
@techreport{davila7-davila7-pymc-bayesian-modeling-2026,
author = {davila7},
title = {pymc-bayesian-modeling security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/davila7-pymc-bayesian-modeling/audits/9},
note = {Author version unspecified}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "pymc-bayesian-modeling security audit report (audit version 9)"
version: "unspecified"
type: report
authors:
- name: "davila7"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/davila7-pymc-bayesian-modeling/audits/9"
identifiers:
- type: other
value: "skillstore:davila7-pymc-bayesian-modeling:audit:9"
description: "Skillstore immutable audit report identifier"
比较变体
2 个可安装变体每位作者的技能都保持为独立的可安装项。推荐变体按 Skillstore 证据排序。
为什么此变体排名第一
davila7-pymc-bayesian-modeling
2026-09-09
k-dense-ai-pymc-bayesian-modeling
2026-09-09
Skillstore 评分
评分依据 证据置信度: 高你能构建什么
设计贝叶斯回归模型
使用适当的先验、标准化预测变量、采样设置和后验检查构建 PyMC 回归模型。
诊断采样问题
检查 R-hat、ESS、发散、树深度和轨迹图,以决定如何改进模型。
比较候选模型
使用 LOO、WAIC、Pareto-k 诊断和模型平均,以负责任的方式比较贝叶斯模型。
试试这些提示
帮助我为这个数据集设计一个 PyMC 模型。识别结果变量、预测变量、可能的似然、有用的先验以及所需的数据准备步骤。
查看这些模型变量并建议弱信息先验。解释每个先验为何合适,以及我应该运行哪些先验预测检查。
解释这些 PyMC 诊断结果并提出修改建议。重点关注发散、R-hat、ESS、树深度、参数化和 target_accept 设置。
使用 LOO 或 WAIC 比较这些候选 PyMC 模型。解释 Pareto-k 可靠性、差异中的不确定性,以及模型平均是否合适。
最佳实践
- 在拟合模型之前运行先验预测检查。
- 在解释之前检查 R-hat、ESS、发散和后验预测拟合。
- 使用命名维度、固定随机种子和记录清楚的先验,以实现可复现的工作流。
避免
- 在检查采样诊断之前,不要解释后验摘要。
- 当可以使用弱信息先验时,不要使用平坦先验。
- 除非对数似然值可用且可靠,否则不要使用 LOO 或 WAIC 比较模型。
常见问题
这个技能会替我运行 PyMC 模型吗?
它面向哪个 PyMC 版本?
它能帮助处理层级模型吗?
它能比较多个贝叶斯模型吗?
它能替代统计审查吗?
使用 pickle 保存模型安全吗?
开发者详情
作者
davila7许可证
MIT
Skillstore 修订
r2
版本提示
作者未声明版本。
引用
c43861a65bb95efcae259cd161c9d6f4dc7eec6f
维护新鲜度
2026/7/24
使用量
11 次下载 · 210 次浏览