本文整理汇总了Python中skills.numerics.Gaussian.at方法的典型用法代码示例。如果您正苦于以下问题:Python Gaussian.at方法的具体用法?Python Gaussian.at怎么用?Python Gaussian.at使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类skills.numerics.Gaussian
的用法示例。
在下文中一共展示了Gaussian.at方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: w_within_margin
# 需要导入模块: from skills.numerics import Gaussian [as 别名]
# 或者: from skills.numerics.Gaussian import at [as 别名]
def w_within_margin(team_performance_difference, draw_margin):
team_performance_difference_abs = abs(team_performance_difference)
denominator = (Gaussian.cumulative_to(draw_margin - team_performance_difference_abs) -
Gaussian.cumulative_to(-draw_margin - team_performance_difference_abs))
if denominator < 2.222758749e-162:
return 1.0
vt = v_within_margin(team_performance_difference_abs, draw_margin)
return (vt ** 2 +
(
(draw_margin - team_performance_difference_abs) *
Gaussian.at(draw_margin - team_performance_difference_abs) -
(-draw_margin - team_performance_difference_abs) *
Gaussian.at(-draw_margin - team_performance_difference_abs)) / denominator)
示例2: v_within_margin
# 需要导入模块: from skills.numerics import Gaussian [as 别名]
# 或者: from skills.numerics.Gaussian import at [as 别名]
def v_within_margin(team_performance_difference, draw_margin):
team_performance_difference_abs = abs(team_performance_difference)
denominator = (
Gaussian.cumulative_to(draw_margin - team_performance_difference_abs) -
Gaussian.cumulative_to(-draw_margin - team_performance_difference_abs))
if denominator < 2.222758749e-162:
if team_performance_difference < 0.0:
return -team_performance_difference - draw_margin
return -team_performance_difference + draw_margin
numerator = (Gaussian.at(-draw_margin - team_performance_difference_abs) -
Gaussian.at(draw_margin - team_performance_difference_abs))
if team_performance_difference < 0.0:
return -numerator / denominator
return numerator / denominator
示例3: v_exceeds_margin
# 需要导入模块: from skills.numerics import Gaussian [as 别名]
# 或者: from skills.numerics.Gaussian import at [as 别名]
def v_exceeds_margin(team_performance_difference, draw_margin):
denominator = Gaussian.cumulative_to(team_performance_difference - draw_margin)
if (denominator < 2.22275874e-162):
return -team_performance_difference + draw_margin
return Gaussian.at(team_performance_difference - draw_margin) / denominator
示例4: testAt
# 需要导入模块: from skills.numerics import Gaussian [as 别名]
# 或者: from skills.numerics.Gaussian import at [as 别名]
def testAt(self):
expected = 0.352065326764300
answer = Gaussian.at(0.5)
self.assertAlmostEqual(expected, answer, None,
"testAt expected %.15f, got %.15f" % (expected, answer),
GaussianDistributionTest.ERROR_TOLERANCE)