algorithms.py 文件源码

python
阅读 43 收藏 0 点赞 0 评论 0

项目:causal_bandits 作者: finnhacks42 项目源码 文件源码
def allocate(self,T,K):
        logK = .5 + np.true_divide(1,range(2,K+1)).sum()
        n = np.zeros((K),dtype=int)
        n[1:] =  np.ceil((1.0/logK)*np.true_divide((T - K),range(K,1,-1)))
        allocations = np.diff(n)
        return allocations
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号