def f_hyperprior_log_prima(x, weight_prod, K, a=1, b=1):
"""
Derivative of Log distribution
"""
res = (a-1) *1. / x - b + np.log(weight_prod) + K * np.log(K) - K * special.digamma(x)
for i in range(K):
res += special.digamma(x + i*1./K)
return res
评论列表
文章目录