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 723b21f commit 3353991Copy full SHA for 3353991
lectures/_static/lecture_specific/chang_credible/changecon.py
@@ -369,16 +369,18 @@ def p_fun2(x):
369
p_iter1 = np.zeros(order)
370
for i in range(order):
371
θ = s[i]
372
+ x0 = np.clip(lb1 + (ub1-lb1)/2, lb1, ub1)
373
res = minimize(p_fun,
- lb1 + (ub1-lb1) / 2,
374
+ x0,
375
method='SLSQP',
376
bounds=bnds1,
377
constraints=cons1,
378
tol=1e-10)
379
if res.success == True:
380
p_iter1[i] = -p_fun(res.x)
381
+ x0 = np.clip(lb2 + (ub2-lb2)/2, lb2, ub2)
382
res = minimize(p_fun2,
- lb2 + (ub2-lb2) / 2,
383
384
385
bounds=bnds2,
386
constraints=cons2,
0 commit comments