def c_Diff(nu1, beta1, m1, kappa1,
nu2, beta2, m2, kappa2):
''' Evaluate difference of cumulant functions c(params1) - c(params2)
May be more numerically stable than directly using c_Func
to find the difference.
Returns
-------
diff : scalar real value of the difference in cumulant functions
'''
cDiff = - 0.5 * LOGTWO * (nu1 - nu2) \
- gammaln(0.5 * nu1) + gammaln(0.5 * nu2) \
+ 0.5 * (np.log(kappa1) - np.log(kappa2)) \
+ 0.5 * (nu1 * np.log(beta1) - nu2 * np.log(beta2))
return np.sum(cDiff)
评论列表
文章目录