From ceead8050bf21166988f875b7114142f2cee87ba Mon Sep 17 00:00:00 2001 From: Rick Sexton Date: Mon, 22 Jan 2024 19:41:11 -0700 Subject: [PATCH] corrected lnp --- basicrta/functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basicrta/functions.py b/basicrta/functions.py index b8e3be3..43e3b91 100644 --- a/basicrta/functions.py +++ b/basicrta/functions.py @@ -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)])