Skip to content

Commit

Permalink
STMCMC test error debug push
Browse files Browse the repository at this point in the history
  • Loading branch information
promitchakroborty committed Mar 10, 2023
1 parent 8921f9b commit accae15
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ def run(self, nsamples: PositiveInteger = None):
proposal_is_symmetric=self.proposal_is_symmetric)

# Setting the generated sample in the array
points[i] = x.samples
points[lead_index] = x.samples

if self.recalculate_weights:
weights[i] = np.exp(
self.evaluate_log_intermediate(points[i, :].reshape((1, -1)), current_tempering_parameter)
- self.evaluate_log_intermediate(points[i, :].reshape((1, -1)), previous_tempering_parameter))
weights[lead_index] = np.exp(
self.evaluate_log_intermediate(points[lead_index, :].reshape((1, -1)), current_tempering_parameter)
- self.evaluate_log_intermediate(points[lead_index, :].reshape((1, -1)), previous_tempering_parameter))
w_sum = np.sum(weights)
for j in range(nsamples):
weight_probabilities[j] = weights[j] / w_sum
Expand Down

0 comments on commit accae15

Please sign in to comment.