Commit 392b1150 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix small error in partition_entropy()

parent 886b377c
......@@ -628,7 +628,7 @@ def partition_entropy(B, N, nr=None):
if nr is None:
S = N * log(B) + log1p(-(1 - 1./B) ** N)
else:
S = lbinom(B + N - 1, N) + scipy.special.gammaln(N) - scipy.special.gammaln(nr + 1).sum()
S = lbinom(B + N - 1, N) + scipy.special.gammaln(N + 1) - scipy.special.gammaln(nr + 1).sum()
return S
def get_max_B(N, E, directed=False):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment