Hacker News new | past | comments | ask | show | jobs | submit login

What's the rationale behind 100 as the thinning factor? Just a conservative number based on the autocorrelation length?



The thinning here is based on a misconception. If the purpose is plotting a histogram it doesn't matter if the samples are correlated. The bin heights are consistently estimated if you keep everything. Throwing away intermediate steps usually just introduces noise.

Thinning is a good idea if the samples are strongly correlated, and the computation to process them all would be better spent on running the chain for longer. Or if you don't know what computation you want in advance, and you can't afford to store everything.

(Also, as someone points out in the comments, the implementation of the Metropolis algorithm in this post is wrong.)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: