界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

sbi_posterior_api

sbi_posterior_api

【效率与协作】Provide observation-conditioned posterior sampling and log-probability APIs for SBI recovery estimators.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: sbi_posterior_api description: Provide observation-conditioned posterior sampling and log-probability APIs for SBI recovery estimators.

SBI Posterior API

Use this skill after an SBI estimator has been trained and a task needs to expose distribution-like posterior behavior. It represents the paper's NeuralPosterior abstraction: a common object conditioned on observations that can produce parameter samples and, when supported, density values.

Do not use this skill to run simulators or train estimator parameters. It consumes an estimator and validates posterior behavior.

Inputs

  • A trained full or reduced estimator.
  • Observation x_o for conditioning.
  • Number of posterior samples and optional random seed.
  • Optional candidate theta values for log-probability evaluation.

Outputs

  • Posterior summary statistics such as mean and standard deviation.
  • Posterior samples conditioned on the observation.
  • Optional log-probability values for supported estimators.

Workflow

  1. Load or receive an estimator with a documented posterior parameterization.
  2. Condition it on an observation.
  3. Produce deterministic samples when a seed is supplied.
  4. Evaluate log probability only when the estimator supports it.
  5. Save posterior summaries for diagnostics and recovery analysis.

Validation

Run:

python /share/project/yuyang/workspace/Paper2Skills/Distiller/skills/module-to-skill/scripts/validate_skill_tree.py /share/project/yuyang/workspace/Paperbench/record/case15/extracted_skills_attempt_001/sbi_toolkit/sbi_posterior_api --run-tests

For a standalone smoke run:

python scripts/posterior_api.py --demo

Limitations

The bundled script implements a scalar Gaussian reduced posterior. Full sbi posteriors can use richer samplers and conditional density estimators, but recovery code should keep the same contract: condition, sample, summarize, and evaluate density only when valid.

我的收藏