3 ms·
Darts, Dice, and Coins: Sampling from a Discrete Distribution (2011)
- incognito124 11mo agoThis is good for sampling from a "static" distribution, which has stable p_i parameters, where you can armotize the alias preprocessing step. If you have a distribution that changes from time to time, for example LLMs where you have a new discrete distribution for every step (N-dimensional dice roll), other methods are used. Recently I wrote a writeup comparing three methods (spoilers: simple is best): https://news.ycombinator.com/item?id=42596716 https://news.ycombinator.com/item?id=42596716
- incognito124 11mo agoAh my domain changed in the meantime, this is the correct URL: https://terra-incognita.blog/posts/9 https://terra-incognita.blog/posts/9
- deleted 11mo ago[deleted]