OrderMCMCAlgorithm<T>

Models & Types · AiDotNet.CausalDiscovery.Bayesian

Order MCMC — MCMC sampling over variable orderings for Bayesian structure learning.

Inheritance: CausalDiscoveryBase<T> → BayesianCausalBase<T> → OrderMCMCAlgorithm<T>

For Beginners

Instead of searching over all possible graphs (very hard), this method searches over all possible orderings of variables (much easier). Once you know the order, finding the best graph is straightforward.

How It Works

Order MCMC samples from the posterior over variable orderings (rather than over DAGs directly). Given an ordering, the optimal DAG can be computed efficiently via greedy parent selection with BIC scoring. The Markov chain proposes moves by swapping adjacent elements in the ordering, accepting with Metropolis-Hastings probability.

Algorithm:

  • Initialize a random variable ordering
  • Propose a new ordering by swapping two adjacent elements
  • Compute optimal DAGs for both orderings using greedy BIC parent selection
  • Accept/reject via Metropolis-Hastings: accept with prob min(1, exp(score_new - score_old))
  • After burn-in, accumulate edge frequencies across accepted samples
  • Return edges that appear in more than 50% of posterior samples

Reference: Friedman and Koller (2003), “Being Bayesian About Network Structure”, MLJ.

Constructors

Constructor Summary
OrderMCMCAlgorithm(CausalDiscoveryOptions options)

Properties

Property Summary
bool SupportsNonlinear { get; }
string Name { get; }