Skip to content
Snippets Groups Projects
Commit 9710edb1 authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Improve minimize setup

parent 1b6feabb
No related branches found
No related tags found
1 merge request!750Improve ptemcee
Pipeline #113471 failed
......@@ -126,12 +126,12 @@ class Ptemcee(MCMCSampler):
likelihood_copy.parameters.update(draw)
x0 = [draw[key] for key in minimize_list]
res = minimize(
neg_log_like, x0, bounds=bounds, method='L-BFGS-B')
neg_log_like, x0, bounds=bounds, method='L-BFGS-B', tol=1e-15)
if res.success:
success.append(res.x)
if trials > 100:
raise SamplerError("Unable to set pos0 from minimize")
if len(success) >= 3:
if len(success) >= 10:
break
success = np.array(success)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment