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


Python special.assoc_laguerre方法代码示例

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


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

示例1: _pdf_skip

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import assoc_laguerre [as 别名]
def _pdf_skip(self, x, dfn, dfd, nc):
        # ncf.pdf(x, df1, df2, nc) = exp(nc/2 + nc*df1*x/(2*(df1*x+df2))) *
        #             df1**(df1/2) * df2**(df2/2) * x**(df1/2-1) *
        #             (df2+df1*x)**(-(df1+df2)/2) *
        #             gamma(df1/2)*gamma(1+df2/2) *
        #             L^{v1/2-1}^{v2/2}(-nc*v1*x/(2*(v1*x+v2))) /
        #             (B(v1/2, v2/2) * gamma((v1+v2)/2))
        n1, n2 = dfn, dfd
        term = -nc/2+nc*n1*x/(2*(n2+n1*x)) + sc.gammaln(n1/2.)+sc.gammaln(1+n2/2.)
        term -= sc.gammaln((n1+n2)/2.0)
        Px = np.exp(term)
        Px *= n1**(n1/2) * n2**(n2/2) * x**(n1/2-1)
        Px *= (n2+n1*x)**(-(n1+n2)/2)
        Px *= sc.assoc_laguerre(-nc*n1*x/(2.0*(n2+n1*x)), n2/2, n1/2-1)
        Px /= sc.beta(n1/2, n2/2)
        # This function does not have a return.  Drop it for now, the generic
        # function seems to work OK. 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:19,代码来源:_continuous_distns.py

示例2: test_assoc_laguerre

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import assoc_laguerre [as 别名]
def test_assoc_laguerre(self):
        a1 = special.genlaguerre(11,1)
        a2 = special.assoc_laguerre(.2,11,1)
        assert_array_almost_equal(a2,a1(.2),8)
        a2 = special.assoc_laguerre(1,11,1)
        assert_array_almost_equal(a2,a1(1),8) 
开发者ID:ktraunmueller,项目名称:Computable,代码行数:8,代码来源:test_basic.py

示例3: _pdf_skip

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import assoc_laguerre [as 别名]
def _pdf_skip(self, x, dfn, dfd, nc):
        n1, n2 = dfn, dfd
        term = -nc/2+nc*n1*x/(2*(n2+n1*x)) + sc.gammaln(n1/2.)+sc.gammaln(1+n2/2.)
        term -= sc.gammaln((n1+n2)/2.0)
        Px = np.exp(term)
        Px *= n1**(n1/2) * n2**(n2/2) * x**(n1/2-1)
        Px *= (n2+n1*x)**(-(n1+n2)/2)
        Px *= sc.assoc_laguerre(-nc*n1*x/(2.0*(n2+n1*x)), n2/2, n1/2-1)
        Px /= sc.beta(n1/2, n2/2)
        # This function does not have a return.  Drop it for now, the generic
        # function seems to work OK. 
开发者ID:nccgroup,项目名称:Splunking-Crime,代码行数:13,代码来源:_continuous_distns.py

示例4: _pdf

# 需要导入模块: from scipy import special [as 别名]
# 或者: from scipy.special import assoc_laguerre [as 别名]
def _pdf(self, x, dfn, dfd, nc):
        n1, n2 = dfn, dfd
        term = -nc/2.+nc*n1*x/(2*(n2+n1*x)) + special.gammaln(n1/2.)+special.gammaln(1+n2/2.)
        term -= special.gammaln((n1+n2)/2.)
        Px = numpy.exp(term)
        Px *= n1**(n1/2.) * n2**(n2/2.) * x**(n1/2.-1)
        Px *= (n2+n1*x)**(-(n1+n2)/2.)
        Px *= special.assoc_laguerre(-nc*n1*x/(2.*(n2+n1*x)), n2/2., n1/2.-1)
        Px /= special.beta(n1/2., n2/2.)
        return Px 
开发者ID:jonathf,项目名称:chaospy,代码行数:12,代码来源:f.py


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