Skip to content

Simple TS implementation #1681

Answered by Balandat
taikichi-pc asked this question in Q&A
Discussion options

You must be logged in to vote

Take a look at MaxPosteriorSampling - this is Thompson sampling. The support for batched models makes it a bit less readable and there a some tensor acrobatics necessary if you want to avoid duplicated samples in that setting, but overall it's pretty straightforward.

Note that this draws samples at some discrete set of points X. Another implementation would be to draw sample paths from the model posterior (using the pathwise sampling feature added in #1463), and then optimize each of them individually using some gradient-based scheme. This is currently not (yet) implemented though.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by taikichi-pc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants