We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84c88c2 commit 7ef2de4Copy full SHA for 7ef2de4
pymc3/smc/smc.py
@@ -177,6 +177,8 @@ def update_weights_beta(self):
177
self.log_marginal_likelihood += logsumexp(log_weights_un) - np.log(self.draws)
178
self.beta = new_beta
179
self.weights = np.exp(log_weights)
180
+ # We normalize again to correct for small numerical errors that might build up
181
+ self.weights /= self.weights.sum()
182
183
def resample(self):
184
"""Resample particles based on importance weights."""
0 commit comments