Skip to main content

> ML_ALGORITHM // MARKOV-CHAIN-MONTE-CARLO-METROPOLIS-HASTINGS_v1.0

Markov Chain Monte Carlo (MCMC / Metropolis-Hastings)

Foundational MCMC algorithm that samples from complex, unnormalized target probability distributions by constructing a Markov chain with the desired equilibrium distribution.

Markov Chain Monte Carlo Samplingbayesian-probabilistichigh-intrinsicsmall (<1k)
Back to All Algorithms
Computational Complexity
Training Complexity:O(chains * samples * likelihood_eval)
Inference Complexity:O(samples) empirical posterior summaries
Hardware Profile
CPU Friendly:Yes
Requires GPU:No
Memory Footprint:low
Interpretability & Data
Interpretability Tier:high-intrinsic
Training Data Needs:small (<1k)

Interpretability Assessment

Generates full empirical posterior probability distributions and credible intervals for every parameter.

Suitable Tasks & Supported Modalities

Suitable Tasks:
bayesian inferenceposterior parameter estimation
Supported Modalities:
tabular

Implementing Libraries

PyMCPyMC Developers / NumFOCUS · v5.16.2
View Spec
stan
SciPySciPy Community / NumFOCUS · v1.14.1
View Spec

Foundational Literature

Common Pitfalls & Warnings
  • Random-walk proposals get stuck in high dimensions (>20 params), resulting in abysmal acceptance rates and poor mixing (use HMC instead)