PyMC Bayesian Modeling
An end-to-end PyMC workflow skill covering hierarchical models, NUTS/variational inference, convergence diagnostics, and LOO/WAIC model comparison.
Data & AnalyticsAdvanced★ 33,030⑂ 3,248AI score 9/10Last updated: Aug 9, 2026
What it does
- Enforces an eight-step Bayesian workflow: data prep → model build → prior predictive check → sampling → diagnostics (R-hat, ESS, divergences) → posterior predictive check → analysis → prediction.
- Provides prior selection guidance by parameter type (scale, unbounded, positive, probability, correlation matrices) and likelihood choices for continuous, count, binary, and categorical outcomes.
- Ships
scripts/model_diagnostics.pyfor automated diagnostic reports (trace, rank, autocorrelation, energy, local ESS plots) andscripts/model_comparison.pyfor PSIS-LOO comparison, reliability checks, and model averaging. - Gives concrete remedies for divergences, low ESS, high R-hat, and slow sampling.
- Includes ready-made linear regression and non-centered hierarchical model templates.
Who it's for
- Data scientists and statisticians who need calibrated uncertainty rather than point estimates.
- Researchers working with multilevel/grouped data (schools, clinics, regions, A/B cohorts).
- PyMC/ArviZ users who repeatedly hit MCMC convergence trouble.
Example uses
- "Fit a hierarchical model of test scores by school" → uses the non-centered template and runs a prior predictive check first.
- "My sampler reported 30 divergences" → walks through target_accept, reparameterization, and tighter priors in order.
- "Compare Poisson vs Negative Binomial fits" →
compare_models()ranks by LOO ELPD and flags unreliable Pareto k values.
· · · Install guide · · ·
Try it now, no install
Paste this into Claude to use the skill without installing anything.
Read the instructions in this file and follow them to help me: https://raw.githubusercontent.com/K-Dense-AI/scientific-agent-skills/HEAD/skills/pymc/SKILL.md What I want: (describe your task here)
If Claude can't open the link, open it yourself and paste the contents instead.
↓ If it works for you, download the ZIP below and install it. Then it runs on its own — no pasting each time.
Install in the Claude app (no terminal)
- Download the ZIP with the button below.
- In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
- Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
Install in Claude Code
Let Claude do it — paste this into Claude Code
Install the skill I found on Claude Skill Mart. Copy the skills/pymc folder from the GitHub repo K-Dense-AI/scientific-agent-skills into my ~/.claude/skills/pymc/. When it's done, tell me in one line what this skill can do.
Install with a command instead
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git && mkdir -p ~/.claude/skills && cp -r scientific-agent-skills/skills/pymc ~/.claude/skills/⚠ This is a third-party skill. Check the source repository before installing.
- Open a terminal and go to a working directory.
- Clone the repo:
git clone https://github.com/K-Dense-AI/scientific-agent-skills.git - Create the skills folder:
mkdir -p ~/.claude/skills - Copy just this skill:
cp -r scientific-agent-skills/skills/pymc ~/.claude/skills/ - Install Python dependencies:
pip install pymc arviz nutpie(the doc'suv pip install "pymc[nutpie]==6.0.1"may reference a nonexistent version — verify withpip index versions pymc). - Restart Claude Code and prompt something like "Build a hierarchical Bayesian model with PyMC for this dataset" to trigger the skill.
View source on GitHub ↗License: MIT