Skip to content

Markov: sample-cloud overlay, About-the-math guide, and a Bayesian posterior target#666

Merged
github-actions[bot] merged 1 commit into
mainfrom
claude/brave-einstein-naikjk
Jul 23, 2026
Merged

Markov: sample-cloud overlay, About-the-math guide, and a Bayesian posterior target#666
github-actions[bot] merged 1 commit into
mainfrom
claude/brave-einstein-naikjk

Conversation

@kkd16

@kkd16 kkd16 commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Follow-up to the Markov sampling studio (initial version merged in #664). All changes stay inside projects/markov-lab-q8f3/.

What's new

  • Long-exposure sample cloud — an accumulation canvas splats every state the chain visits with additive blending, so the sampler is seen repainting the target density one dot at a time (toggle: cloud). Turn density off and watch it rebuild the distribution from scratch.
  • Keyboard shortcutsspace run/pause, s step, r reset.
  • "About the math" guide — a modal explaining all eight samplers, how to read every diagnostic (ESS, ESS/eval, split-R̂, autocorrelation time τ), and a guided set of experiments.
  • A real Bayesian posterior target — a sixth target whose two coordinates are the intercept and slope of a logistic regression fit to 18 near-separable data points (numerically-stable log-likelihood + exact gradient, N(0, 3²) prior). Because it satisfies the same Target interface, every sampler and every diagnostic now performs genuine posterior inference for free: the running mean is the posterior-mean estimate and the 95% CI is a real credible interval.

Notes

  • Verified locally with node scripts/verify-project.mjs markov-lab-q8f3 — scope + conformance + lint + build all green.
  • Smoke-tested in headless Chromium: the cloud overlay, the About modal wiring, and the logistic posterior all render live (HMC exploring a broad, prior-regularised correlated ridge, exactly as expected for near-separable data).
  • Branch was restarted from the latest main after Add Markov — a from-scratch Monte-Carlo sampling studio #664 auto-merged, so this PR contains only the follow-up diff.

🤖 Generated with Claude Code


Generated by Claude Code

…arget

Follow-up to the initial Markov studio (merged in #664):
- Long-exposure accumulation canvas that splats every visited state, so the
  chain visibly repaints the target density (toggle: cloud).
- Keyboard shortcuts: space run/pause, s step, r reset.
- 'About the math' modal explaining all eight samplers, the diagnostics
  (ESS, ESS/eval, split-R-hat, autocorrelation time), and experiments to run.
- A sixth target: a real Bayesian logistic-regression posterior over the
  (intercept, slope) of 18 near-separable points (numerically-stable
  log-likelihood + exact gradient, N(0,3^2) prior). Every sampler and diagnostic
  now performs genuine posterior inference — running mean = posterior mean,
  95% CI = credible interval.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Scope + lint + build passed.

@github-actions
github-actions Bot merged commit cc9ebec into main Jul 23, 2026
2 checks passed
@github-actions
github-actions Bot deleted the claude/brave-einstein-naikjk branch July 23, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants