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


Python special.stdtr方法代码示例

本文整理汇总了Python中scipy.special.stdtr方法的典型用法代码示例。如果您正苦于以下问题:Python special.stdtr方法的具体用法?Python special.stdtr怎么用?Python special.stdtr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在scipy.special的用法示例。


在下文中一共展示了special.stdtr方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _cdf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def _cdf(self, x, df):
        return sc.stdtr(df, x) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:4,代码来源:_continuous_distns.py

示例2: _sf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def _sf(self, x, df):
        return sc.stdtr(df, -x) 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:4,代码来源:_continuous_distns.py

示例3: test_stdtr

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def test_stdtr(self):
        # Ideally the left endpoint for Arg() should be 0.
        assert_mpmath_equal(
            sp.stdtr,
            _student_t_cdf,
            [IntArg(1, 100), Arg(1e-10, np.inf)], rtol=1e-7) 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:8,代码来源:test_cdflib.py

示例4: batched_univ_t_cdf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def batched_univ_t_cdf(x, loc, scale, dof):
  x, loc, scale, dof = np.squeeze(x), np.squeeze(loc), np.squeeze(scale), np.squeeze(dof)
  assert x.shape == loc.shape == scale.shape == dof.shape and x.ndim == 1
  x_norm = (x - loc) / scale
  p = stdtr(dof, x_norm)
  return p 
开发者ID:freelunchtheorem,项目名称:Conditional_Density_Estimation,代码行数:8,代码来源:distribution.py

示例5: _cdf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def _cdf(self, x, df, C, Ci):
        out = special.stdtr(df, numpy.dot(Ci, special.stdtrit(df, x)))
        return out 
开发者ID:jonathf,项目名称:chaospy,代码行数:5,代码来源:t_copula.py

示例6: _ppf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def _ppf(self, q, df, C, Ci):
        out = special.stdtr(df, numpy.dot(C, special.stdtrit(df, q)))
        return out 
开发者ID:jonathf,项目名称:chaospy,代码行数:5,代码来源:t_copula.py

示例7: _cdf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def _cdf(self, x, a, C, Ci, loc):
        x = numpy.dot(Ci, (x.T-loc.T).T)
        return special.stdtr(a, x) 
开发者ID:jonathf,项目名称:chaospy,代码行数:5,代码来源:mv_student_t.py

示例8: _cdf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def _cdf(self, x, a):
        return special.stdtr(a, x) 
开发者ID:jonathf,项目名称:chaospy,代码行数:4,代码来源:student_t.py

示例9: test_nonfinite

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import stdtr [as 别名]
def test_nonfinite():
    funcs = [
        ("btdtria", 3),
        ("btdtrib", 3),
        ("bdtrik", 3),
        ("bdtrin", 3),
        ("chdtriv", 2),
        ("chndtr", 3),
        ("chndtrix", 3),
        ("chndtridf", 3),
        ("chndtrinc", 3),
        ("fdtridfd", 3),
        ("ncfdtr", 4),
        ("ncfdtri", 4),
        ("ncfdtridfn", 4),
        ("ncfdtridfd", 4),
        ("ncfdtrinc", 4),
        ("gdtrix", 3),
        ("gdtrib", 3),
        ("gdtria", 3),
        ("nbdtrik", 3),
        ("nbdtrin", 3),
        ("nrdtrimn", 3),
        ("nrdtrisd", 3),
        ("pdtrik", 2),
        ("stdtr", 2),
        ("stdtrit", 2),
        ("stdtridf", 2),
        ("nctdtr", 3),
        ("nctdtrit", 3),
        ("nctdtridf", 3),
        ("nctdtrinc", 3),
        ("tklmbda", 2),
    ]

    np.random.seed(1)

    for func, numargs in funcs:
        func = getattr(sp, func)

        args_choices = [(float(x), np.nan, np.inf, -np.inf) for x in
                        np.random.rand(numargs)]

        for args in itertools.product(*args_choices):
            res = func(*args)

            if any(np.isnan(x) for x in args):
                # Nan inputs should result to nan output
                assert_equal(res, np.nan)
            else:
                # All other inputs should return something (but not
                # raise exceptions or cause hangs)
                pass 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:55,代码来源:test_cdflib.py


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