当前位置: 首页>>代码示例>>Python>>正文


Python Gaussian.at方法代码示例

本文整理汇总了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)
开发者ID:Geoff1938,项目名称:PythonSkills,代码行数:18,代码来源:truncated.py

示例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
开发者ID:Geoff1938,项目名称:PythonSkills,代码行数:19,代码来源:truncated.py

示例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
开发者ID:Geoff1938,项目名称:PythonSkills,代码行数:7,代码来源:truncated.py

示例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)
开发者ID:agoragames,项目名称:PythonSkills,代码行数:8,代码来源:test_numerics.py


注:本文中的skills.numerics.Gaussian.at方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。