离散采样算法---Alias采样方法

应用场景:比如一个随机事件包含4种情况,每种情况发生的概率分别为:$\frac{1}{2},\frac{1}{3},\frac{1}{12},\frac{1}{12}$,怎么产生符合这个概率的采样方法?

解决方法:Alias算法,O(1)

参考链接:

【1】中文:【数学】时间复杂度O(1)的离散采样算法—— Alias method/别名采样方法

【2】英文:Darts, Dice, and Coins: Sampling from a Discrete Distribution

猜你喜欢

转载自www.cnblogs.com/nxf-rabbit75/p/11366077.html