pymc

Build, fit, and compare Bayesian models with PyMC and ArviZ.

Updated Apr 2, 2026
One-click install
npx skills add https://github.com/viniruggeri/applied-dynamical-systems --skill pymc-viniruggeri
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pymc
Source: https://github.com/viniruggeri/applied-dynamical-systems/tree/main/.agents/skills/pymc
Command: npx skills add https://github.com/viniruggeri/applied-dynamical-systems --skill pymc-viniruggeri

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

PyMC provides a Python-based framework for Bayesian modeling and probabilistic programming, enabling practitioners to build probabilistic models, fit them with MCMC or VI, and assess uncertainty and model adequacy. It unifies data preparation, priors, likelihoods, sampling, diagnostics, and posterior predictive checks within a cohesive workflow.

Core Features & Use Cases

  • MCMC sampling with NUTS for continuous parameters;
  • Variational inference (ADVI) for fast approximate inference;
  • Hierarchical/multilevel modeling and time-series;
  • Model comparison using LOO/WAIC and posterior predictive checks;
  • Integration with ArviZ for diagnostics and visualization.

Quick Start

Fit a simple Bayesian linear regression with PyMC to estimate coefficients and assess predictive uncertainty.

Frequently Asked Questions about pymc

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

FAQPage Schema
How do I build and fit a Bayesian model for hierarchical regression?

Build and fit Bayesian hierarchical models by defining priors and likelihoods, then sampling with MCMC NUTS or variational inference to estimate posterior distributions for regression coefficients.

What is the best way to compare Bayesian models and validate predictions?

Compare Bayesian models using information criteria like LOO and WAIC, and validate predictive adequacy by running posterior predictive checks to assess how well models replicate observed data.

Can I use ArviZ for MCMC diagnostics and posterior visualization?

Yes, ArviZ integrates directly to provide comprehensive MCMC diagnostics and visualizations, enabling you to trace sampling performance, assess convergence, and plot posterior distributions effectively.

Does this framework support time-series and stochastic differential equations?

Yes, the framework supports fitting time-series models and stochastic differential equations (SDEs) using PyMC, allowing you to model dynamic systems and estimate parameters with Bayesian inference.

Do I need PyMC 5.x and specific dependencies for Bayesian inference?

Yes, you need PyMC 5.x or higher along with ArviZ, NumPy, Pandas, and Matplotlib to execute the complete workflow of data preparation, Bayesian sampling, diagnostics, and visualization.

When should I use variational inference instead of MCMC sampling?

Use variational inference (ADVI) for fast approximate Bayesian inference on large datasets when computational speed is critical, and use MCMC NUTS sampling when precise posterior estimation is required.