Skip to content

Commit

Permalink
Small fix to optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
mraveri committed Jun 18, 2020
1 parent 47c997b commit 6e0425e
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions tensiometer/chains_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,16 +397,8 @@ def opt_helper(x):
problem = Problem(manifold=manifold, cost=opt_helper, verbosity=feedback)
# optimization:
if optimizer == 'ParticleSwarm':
num_solutions = num_params*(2*n-1)**(num_params-1)
options = {
'populationsize': kwargs.pop('populationsize', num_solutions/10),
'maxcostevals': kwargs.pop('maxcostevals', 10*num_solutions),
'maxiter': kwargs.pop('maxiter', max(600, 4 * num_params)),
'nostalgia': kwargs.pop('nostalgia', 1.4),
'social': kwargs.pop('social', 1.4)
}
solver = pymanopt.solvers.ParticleSwarm(logverbosity=0,
**options, **kwargs)
# num_solutions = num_params*(2*n-1)**(num_params-1)
solver = pymanopt.solvers.ParticleSwarm(logverbosity=0, **kwargs)
Xopt = solver.solve(problem)
elif optimizer == 'TrustRegions':
solver = pymanopt.solvers.TrustRegions(logverbosity=0, **kwargs)
Expand Down

0 comments on commit 6e0425e

Please sign in to comment.