首页 > 其他分享 >再谈汤普森采样(Thompson Sampling)

再谈汤普森采样(Thompson Sampling)

时间:2022-12-08 15:44:34浏览次数:55  
标签:采样 wins 汤普森 Sampling beta Thompson

相关:

【转载】 推荐算法之Thompson(汤普森)采样

【转载】 推荐系统 EE 问题与 Bandit 算法 

python语言绘图:绘制一组beta分布图

转载: beta分布介绍 

 

 

=====================================

 

 

之前已经share了多篇相关的post,最近看到了一个新的这方面的东西,就想着再谈下这个问题。汤普森采样(Thompson Sampling)是MAB(Multi arm bandit)问题中经常被讨论的一种均衡exploit和explore的方法,之前已经解释了很多相关的资料,最近看到了些不一样的东西,之前share的汤普森采样(Thompson Sampling)都是使用beta分布做先验和后延的,不过发现最近发现也有使用正太分布做先验和后验的。

 

 

 

choice = numpy.argmax(pymc.rbeta(1 + self.wins, 1 + self.trials - self.wins))
 

 

 

import  numpy as np

import  pymc

# wins 和 trials 都是一个 N 维向量,N 是臂的个数

# wins 表示所有臂的 α 参数,loses 表示所有臂的 β 参数

choice = np.argmax(pymc.rbeta(1 + wins, 1 + loses, len(wins)))

 

标签:采样,wins,汤普森,Sampling,beta,Thompson
From: https://www.cnblogs.com/devilmaycry812839668/p/16966281.html

相关文章