Skip/nth Sampling in Turing / Thinning

I’ve got a situation where I’m trying to select a set of “discriminators” from among a large number of things… so I want a vector of either -1,0,1 which when dotted with a vector of 0,1 (absent,present) gives a “score” that i can use like a logit.

Since this is a discrete distribution I’m doing MH() sampling, and I want to do a very large number of samples, like 1M but I want to keep only every 100th sample or something. In the end I’d have 10k samples but hopefully much less autocorrelated than if I had just done 10k samples.

sample(model, MH(),1_000_000; skip=100) #or something

How can I make Turing keep only every 100th sample?

There doesn’t seem to be anything in the docs?

EDIT: by reading the code I see there’s a “thin” option? is this the right thing? If so, is there somewhere this is described in the docs? If not, where should it go, I’ll do a PR.

sam = sample(fmmodel,MH(),50000; discard_initial=2000,thinning=20)

For example, looks like the options I’m looking for are “thinning” and “discard_initial”

It can be found in AbstractMCMC, which hosts the sampling interface for Turing:

thinning (default: 1): factor by which to thin samples.