models.py 文件源码

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

项目:causal_bandits 作者: finnhacks42 项目源码 文件源码
def V(self,eta):
        """ returns a vector of length K with the expected value of R (over x sampled from p(x|a)) for each action a """
        #with np.errstate(divide='ignore'):        
        u = np.true_divide(1.0,np.dot(self.A,eta))
        u = np.nan_to_num(u) # converts infinities to very large numbers such that multiplying by 0 gives 0
        v = np.dot(self.A2T,u)
        return v
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号