AI Skill MartBrowse skillsPromptsProgramsLearnWhat is a Skill?
← Back to list

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.py for automated diagnostic reports (trace, rank, autocorrelation, energy, local ESS plots) and scripts/model_comparison.py for 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

  1. "Fit a hierarchical model of test scores by school" → uses the non-centered template and runs a prior predictive check first.
  2. "My sampler reported 30 divergences" → walks through target_accept, reparameterization, and tighter priors in order.
  3. "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)
  1. Download the ZIP with the button below.
  2. In Claude, open Settings → Capabilities and turn on 'Code execution and file creation'. (one time)
  3. Go to Customize → Skills → + → 'Upload a skill' and upload the ZIP.
↓ Download ZIP
Install in Claude Code

Let Claude do it — paste this into Claude Code

Install the skill I found on AI 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.

  1. Open a terminal and go to a working directory.
  2. Clone the repo: git clone https://github.com/K-Dense-AI/scientific-agent-skills.git
  3. Create the skills folder: mkdir -p ~/.claude/skills
  4. Copy just this skill: cp -r scientific-agent-skills/skills/pymc ~/.claude/skills/
  5. Install Python dependencies: pip install pymc arviz nutpie (the doc's uv pip install "pymc[nutpie]==6.0.1" may reference a nonexistent version — verify with pip index versions pymc).
  6. Restart Claude Code and prompt something like "Build a hierarchical Bayesian model with PyMC for this dataset" to trigger the skill.