Skip to content

Commit

Permalink
corrected lnp
Browse files Browse the repository at this point in the history
  • Loading branch information
rsexton2 committed Jan 23, 2024
1 parent 4cb6f23 commit ceead80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions basicrta/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ def run(self):

# Compute log posterior
lnp[j] = np.log(tmp.take(s)).sum()+\
np.log(mcweights[j][uniqs]).sum()-\
(mcrates[j][uniqs]*rhypers[uniqs, 1]).sum()+\
np.log(mcweights[j][uniqs]**(whypers[uniqs]-1)).sum()
np.log(mcweights[j]).sum()-\
(mcrates[j]*rhypers[:, 1]).sum()+\
np.log(mcweights[j]**(whypers-1)).sum()

Ns[j][:] = np.array([len(inds[i]) for i in range(ncomp)])
Ts = np.array([x[inds[i]].sum() for i in range(ncomp)])
Expand Down

0 comments on commit ceead80

Please sign in to comment.