本文整理汇总了Python中scipy.special.gammaincinv方法的典型用法代码示例。如果您正苦于以下问题:Python special.gammaincinv方法的具体用法?Python special.gammaincinv怎么用?Python special.gammaincinv使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类scipy.special
的用法示例。
在下文中一共展示了special.gammaincinv方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _ppf
# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def _ppf(self, q, df):
return np.sqrt(2*sc.gammaincinv(.5*df, q))
示例2: _isf
# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def _isf(self, q, a, c):
val1 = sc.gammaincinv(a, q)
val2 = sc.gammainccinv(a, q)
return np.where(c > 0, val2, val1)**(1.0/c)
示例3: test_gammainccinv
# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_gammainccinv(self):
gccinv = special.gammainccinv(.5,.5)
gcinv = special.gammaincinv(.5,.5)
assert_almost_equal(gccinv,gcinv,8)
示例4: test_gammaincinv
# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_gammaincinv(self):
y = special.gammaincinv(.4,.4)
x = special.gammainc(.4,y)
assert_almost_equal(x,0.4,1)
y = special.gammainc(10, 0.05)
x = special.gammaincinv(10, 2.5715803516000736e-20)
assert_almost_equal(0.05, x, decimal=10)
assert_almost_equal(y, 2.5715803516000736e-20, decimal=10)
x = special.gammaincinv(50, 8.20754777388471303050299243573393e-18)
assert_almost_equal(11.0, x, decimal=10)
示例5: test_975
# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_975(self):
# Regression test for ticket #975 -- switch point in algorithm
# check that things work OK at the point, immediately next floats
# around it, and a bit further away
pts = [0.25,
np.nextafter(0.25, 0), 0.25 - 1e-12,
np.nextafter(0.25, 1), 0.25 + 1e-12]
for xp in pts:
y = special.gammaincinv(.4, xp)
x = special.gammainc(0.4, y)
assert_tol_equal(x, xp, rtol=1e-12)
示例6: test_975
# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_975(self):
# Regression test for ticket #975 -- switch point in algorithm
# check that things work OK at the point, immediately next floats
# around it, and a bit further away
pts = [0.25,
np.nextafter(0.25, 0), 0.25 - 1e-12,
np.nextafter(0.25, 1), 0.25 + 1e-12]
for xp in pts:
y = special.gammaincinv(.4, xp)
x = special.gammainc(0.4, y)
assert_allclose(x, xp, rtol=1e-12)
示例7: test_gammainc_roundtrip
# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import gammaincinv [as 别名]
def test_gammainc_roundtrip():
a = np.logspace(-5, 10, 100)
x = np.logspace(-5, 10, 100)
y = sc.gammaincinv(a, sc.gammainc(a, x))
assert_allclose(x, y, rtol=1e-10)