pymc

Build Bayesian models with PyMC for sampling, diagnostics, and posterior predictive checks.

Updated Mar 21, 2026
One-click install
npx skills add https://github.com/ManfronEnrico/thesis-manifold --skill pymc-manfronenrico
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymc
Source: https://github.com/ManfronEnrico/thesis-manifold/tree/main/.claude/skills/pymc
Command: npx skills add https://github.com/ManfronEnrico/thesis-manifold --skill pymc-manfronenrico

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

PyMC provides a robust framework for Bayesian modeling, enabling uncertainty quantification and principled inference for complex data.

Core Features & Use Cases

  • Hierarchical/multilevel modeling with partial pooling to borrow strength across groups.
  • MCMC sampling (NUTS) and variational inference for scalable posterior estimation.
  • Posterior predictive checks and information criteria (LOO/WAIC) for model validation and comparison.
  • Integrated diagnostics with ArviZ for convergence, ESS, and divergences.

Quick Start

Install PyMC, prepare your data, and run a basic hierarchical model to see posterior summaries.

Frequently Asked Questions about pymc

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

FAQPage Schema
How do I build a Bayesian hierarchical model with partial pooling in Python?

Bayesian hierarchical modeling with partial pooling is achieved by specifying multilevel priors in PyMC, allowing groups to borrow strength across data. This enables robust inference where group-level estimates shrink toward a shared population mean.

What is the best way to run MCMC sampling and check posterior diagnostics?

MCMC sampling via NUTS is handled natively in PyMC, with posterior diagnostics like convergence, effective sample size, and divergences evaluated using ArviZ. This combination ensures reliable uncertainty quantification and validates model fit.

How do I perform posterior predictive checks and model comparison using LOO or WAIC?

Posterior predictive checks and model comparison use information criteria like LOO and WAIC to validate Bayesian models. PyMC generates posterior samples and ArviZ computes these diagnostics to compare predictive accuracy across different model specifications.

Can I apply Bayesian probabilistic programming to time-series and logistic regression tasks?

Bayesian probabilistic programming in PyMC applies directly to time-series, logistic, and linear regression tasks. It supports scalable posterior estimation through variational inference and MCMC for complex data structures.

Do I need ArviZ and PyMC 5.x installed to run Bayesian inference workflows?

ArviZ and PyMC 5.x or higher are required to run the complete Bayesian inference workflow. The environment also requires a standard Python data stack including NumPy, Pandas, and Matplotlib for data preparation and results reporting.