yzj623/pplab/apt-posterior-transformation
Claude Code and agent skill by yzj623/pplab
- community
Checking that the SKILL.md file is still in the repository.
Compute APT posterior-to-proposal-posterior transformations for Gaussian and finite normalized density settings without importance weighting.
Install
npx vskill@latest install yzj623/pplab/apt-posterior-transformationSKILL.md
The same SKILL.md was published earlier as yzj623/pplab/apt-posterior-transformation.
APT Posterior Transformation
Use this skill when a recovery or implementation needs the central APT transformation from a true-posterior estimator q(theta | x) to the proposal-posterior density used for proposal-drawn training data. Do not use it for SNPE-B-style importance weighting or SNPE-A-style post-hoc posterior correction.
Inputs
- Posterior estimate density values or Gaussian parameters.
- Prior density values or Gaussian parameters.
- Proposal density values or Gaussian parameters.
- Optional finite grid or atom scores for normalization checks.
Outputs
- Gaussian transformed proposal-posterior mean and variance.
- Finite normalized probabilities proportional to
q(theta | x) * proposal(theta) / prior(theta). - Diagnostics for invalid transformed precision, nonfinite scores, or support mismatches.
Workflow
- For generic finite points, compute
log_q + log_proposal - log_prior. - Normalize with log-sum-exp to get proposal-posterior probabilities.
- For Gaussian inputs, compute transformed precision:
posterior_precision + proposal_precision - prior_precision.
- Compute transformed mean from the transformed natural mean.
- Reject or flag invalid transforms where precision is not positive.
Validation
Run:
The tests compare Gaussian closed form against finite-grid normalization and check numerical stability. They also assert that invalid Gaussian precision is reported rather than converted into a nonsensical variance.
Limitations
- The script implements scalar Gaussian transforms and finite-score normalization.
- Mixture-of-Gaussians formulas are described in the paper but not fully implemented here because the reduced recovery only needs scalar Gaussian checks.
- This skill provides transformation math; it does not run simulator rounds or optimizer steps.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbasicagent-skill/skill_library/paperbench/all-in-one/skill/automatic_posterior_transformation/apt_posterior_transformation/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yzj623/pplab/apt-posterior-transformation)