pymc

Build, fit, and validate Bayesian models with PyMC workflows.

22|4|Updated May 25, 2026
One-click install
npx skills add https://github.com/crazymsn/academic-skills --skill pymc-crazymsn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymc
Source: https://github.com/crazymsn/academic-skills/tree/main/academic-skills/pymc
Command: npx skills add https://github.com/crazymsn/academic-skills --skill pymc-crazymsn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires arviz, numpy, matplotlib, pandas, pymc, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

PyMC enables building, fitting, validating, and comparing Bayesian models with a modern Python API, covering hierarchical models, MCMC, variational inference, and model comparison.

Core Features & Use Cases

  • Bayesian workflow: data prep, priors, model specification, sampling, diagnostics, and posterior predictive checks.
  • Multi-method inference: supports MCMC (NUTS) and variational inference (ADVI) with ArviZ-based diagnostics.
  • Patterns and templates: ready-to-use templates for linear regression and hierarchical models plus model comparison workflows and references.

Quick Start

Install PyMC, define a simple model, and run sampling to inspect the posterior.

Frequently Asked Questions about pymc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build and validate a Bayesian hierarchical model in Python?

You can build and validate a Bayesian hierarchical model by defining priors, specifying the model structure, sampling with MCMC NUTS, and running posterior predictive checks with ArviZ diagnostics.

What is the best way to run Bayesian inference for uncertainty quantification?

Bayesian inference for uncertainty quantification is best handled by applying a full probabilistic workflow, utilizing MCMC or variational inference, and validating posterior distributions through prior and posterior predictive checks.

Does this workflow support both MCMC and variational inference for probabilistic programming?

Yes, the probabilistic programming workflow supports both MCMC NUTS and variational inference ADVI, allowing you to fit models and generate diagnostics using ArviZ for multi-method inference.

Can I use ArviZ for model comparison and diagnostics in a Bayesian workflow?

Yes, you can use ArviZ for model comparison and diagnostics within the Bayesian workflow to evaluate sampling performance, validate posterior distributions, and compare different probabilistic models.

How do I perform prior predictive checks before fitting a Bayesian regression model?

Prior predictive checks are performed by simulating data from the model using only the defined priors before fitting, ensuring the priors are plausible and preventing unintended posterior distributions.

When should I use variational inference instead of MCMC for Bayesian modeling?

Variational inference is used instead of MCMC when faster approximate inference is needed for large-scale Bayesian modeling, trading exact posterior exploration for computational speed during the probabilistic workflow.