examples.py 文件源码

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

项目:MCEvidence 作者: yabebalFantaye 项目源码 文件源码
def __init__(self,p=[-0.9594,4.294],pprior=None,
                 N=50,x=None,**kwargs):

        f=lambda t,s: np.array([t-s*abs(t),t+s*abs(t)])

        if pprior is None:
            self.pprior={'p'+str(i) : f(t,10) for i,t in enumerate(p) }

        self.label=self.pprior.keys()
        self.ndim=len(p)
        self.p=p        
        if x is None:
            self.N=N
            self.x = np.sort(10*np.random.rand(N))
        else:
            self.N=len(x)
            self.x=x

        self.y,self.yerr=self.data(**kwargs)

    # As prior, we assume an 'uniform' prior (i.e. constant prob. density)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号