AI engineering glossary · Reinforcement learning

What is thompson sampling?

Thompson sampling (also called Posterior sampling): A bandit method that keeps a probability distribution over each option's true average reward, draws one sample from each distribution, and picks the option with the highest sample. Uncertain options get sampled high sometimes, so exploration happens naturally.

Level: advancedTopic: Reinforcement learning

Thompson sampling: an example

For click rates with Beta(successes+1, failures+1) beliefs, an arm with 3 clicks in 10 views often gets sampled above one with 30 in 100.

Related terms

More Reinforcement learning terms

Where you learn it

Thompson sampling is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.