Skip to content

Commit

Permalink
removing some debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
gbomarito committed Oct 3, 2023
1 parent 35d954c commit 21bdbe9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions bingo/local_optimizers/smcpy_optimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

from .local_optimizer import LocalOptimizer

import matplotlib.pyplot as plt


class SmcpyOptimizer(LocalOptimizer):
"""An optimizer that uses SMCPy for probabilistic parameter calibration
Expand Down Expand Up @@ -234,10 +232,6 @@ def _generate_proposal_samples(self, individual, num_samples):
if self._uniformly_weighted_proposal:
pdf = np.ones_like(pdf)

# print(samples)
# plt.hist(samples[:, 0], bins=25)
# plt.savefig("debug_proposal_hist_L.png")

samples = dict(zip(param_names, samples.T))
return samples, pdf

Expand All @@ -261,7 +255,6 @@ def _estimate_covariance(self, individual):
f, g = self._objective_fn.get_fitness_vector_and_jacobian(
individual
)
# print(f"f shape {f.shape}")
h = np.squeeze(individual.evaluate_with_local_opt_hessian_at(self.objective_fn.training_data.x)[1].detach().numpy(),1)
A = 2*np.sum(np.einsum('...i,...j->...ij', g, g)
+ np.expand_dims(f, axis=(1,2))*h, axis=0)
Expand Down

0 comments on commit 21bdbe9

Please sign in to comment.