當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。