本文整理汇总了Python中IMP.isd.LognormalRestraint.evaluate方法的典型用法代码示例。如果您正苦于以下问题:Python LognormalRestraint.evaluate方法的具体用法?Python LognormalRestraint.evaluate怎么用?Python LognormalRestraint.evaluate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IMP.isd.LognormalRestraint
的用法示例。
在下文中一共展示了LognormalRestraint.evaluate方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testdmu
# 需要导入模块: from IMP.isd import LognormalRestraint [as 别名]
# 或者: from IMP.isd.LognormalRestraint import evaluate [as 别名]
def testdmu(self):
"Test LognormalRestraint(3) mu derivative"
gr = LognormalRestraint(*self.all)
for i in range(100):
map(self.change_value, self.all)
gr.evaluate(True)
self.assertAlmostEqual(Nuisance(self.mu).get_nuisance_derivative(),
self.deriv_mu(*self.all))
示例2: testE
# 需要导入模块: from IMP.isd import LognormalRestraint [as 别名]
# 或者: from IMP.isd.LognormalRestraint import evaluate [as 别名]
def testE(self):
"Test LognormalRestraint(3) score"
gr = LognormalRestraint(*self.all)
for i in range(100):
map(self.change_value, self.all)
e = gr.evaluate(False)
self.assertAlmostEqual(e, self.normal_e(*self.all))
示例3: testSanityPE
# 需要导入模块: from IMP.isd import LognormalRestraint [as 别名]
# 或者: from IMP.isd.LognormalRestraint import evaluate [as 别名]
def testSanityPE(self):
"Test if LognormalRestraint(13) prob is exp(-score)"
gr = LognormalRestraint(*self.all)
for i in range(100):
map(self.change_value, self.all)
self.assertAlmostEqual(gr.get_probability(),
exp(-gr.evaluate(False)), delta=0.001)
示例4: testSanityEP
# 需要导入模块: from IMP.isd import LognormalRestraint [as 别名]
# 或者: from IMP.isd.LognormalRestraint import evaluate [as 别名]
def testSanityEP(self):
"Test if LognormalRestraint(13) score is -log(prob)"
gr = LognormalRestraint(*self.all)
for i in range(100):
map(self.change_value, self.all)
expected = gr.get_probability()
if expected == 0:
continue
self.assertAlmostEqual(-log(expected),
gr.evaluate(False), delta=0.001)