PyMC Samplers

Configure and troubleshoot PyMC sampling methods with NUTS, Metropolis, and Hamiltonian samplers.

178|13|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/pymc-labs/decision-lab --skill pymc-samplers-pymc-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PyMC Samplers
Source: https://github.com/pymc-labs/decision-lab/tree/main/decision-packs/mmm/opencode/skills/samplers
Command: npx skills add https://github.com/pymc-labs/decision-lab --skill pymc-samplers-pymc-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pymc, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides solutions to sampling errors, convergence issues, sampler configuration, and trace-related problems in PyMC models, ensuring robust and accurate data science analyses.

Core Features & Use Cases

  • Expert Sampling: Offers comprehensive knowledge on PyMC sampling methods, including NUTS, HMC, Metropolis variants, and the pm.sample() API.
  • Migrating to Latest PyMC: Assists in migrating notebook code to the latest stable PyMC version.
  • Convergence and Sampling Issues: Helps configure sampling parameters and troubleshoot common problems like divergences and slow sampling.

Quick Start

Utilize the PyMC Samplers Skill to perform NUTS sampling with target acceptance of 0.95 and max tree depth of 10 for your model.

Frequently Asked Questions about PyMC Samplers

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

FAQPage Schema
How do I fix divergences and convergence problems in PyMC sampling?

To fix PyMC sampling divergences and convergence problems, configure sampling parameters like target acceptance to 0.95 and adjust the max tree depth. This Skill troubleshoots trace-related issues to ensure robust model convergence.

What is the best way to configure NUTS and Metropolis samplers for complex PyMC models?

The best way to configure NUTS and Metropolis samplers for complex PyMC models is by adjusting the pm.sample() API parameters. This Skill provides expertise in setting up Hamiltonian samplers to handle complex model structures reliably.

How do I migrate notebook code from PyMC3 to the latest stable version?

To migrate notebook code from PyMC3 to the latest stable version, update your sampling methods and API calls. This Skill assists with migrating your code to address version-specific changes and ensure compatibility.

Why does my PyMC MCMC sampling run so slowly?

PyMC MCMC sampling runs slowly due to suboptimal sampler configurations or complex model structures. This Skill helps troubleshoot slow sampling by optimizing NUTS and Hamiltonian sampler parameters for your models.

Does PyMC support handling complex model structures with NUTS sampling?

Yes, PyMC supports handling complex model structures with NUTS sampling. This Skill provides expertise in configuring the NUTS sampler, including setting target acceptance and max tree depth, to accurately model complex data.