应用场景:比如一个随机事件包含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

相关文章:

  • 2021-08-15
  • 2021-08-01
  • 2021-12-23
  • 2021-05-06
  • 2021-11-19
  • 2021-11-28
  • 2021-08-18
猜你喜欢
  • 2021-09-21
  • 2021-05-24
  • 2021-05-02
  • 2022-12-23
  • 2021-04-05
  • 2021-10-02
相关资源
相似解决方案