Skip to content

Commit 6a5a980

Browse files
replace optimisation function argument of find_MAP (#396)
* update function argument Co-authored-by: Oriol (ZBook) <[email protected]>
1 parent 5c21572 commit 6a5a980

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/gaussian_processes/GP-smoothing.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
"def infer_z(smoothing):\n",
208208
" with model:\n",
209209
" smoothing_param.set_value(smoothing)\n",
210-
" res = pm.find_MAP(vars=[z], fmin=optimize.fmin_l_bfgs_b)\n",
210+
" res = pm.find_MAP(vars=[z], method=\"L-BFGS-B\")\n",
211211
" return res[\"z\"]"
212212
]
213213
},

myst_nbs/gaussian_processes/GP-smoothing.myst.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Let's also make a helper function for inferring the most likely values of $z$:
121121
def infer_z(smoothing):
122122
with model:
123123
smoothing_param.set_value(smoothing)
124-
res = pm.find_MAP(vars=[z], fmin=optimize.fmin_l_bfgs_b)
124+
res = pm.find_MAP(vars=[z], method="L-BFGS-B")
125125
return res["z"]
126126
```
127127

@@ -155,7 +155,7 @@ title(f"Smoothing={smoothing}");
155155

156156
### Smoothing "to the limits"
157157

158-
By increasing the smoothing parameter, we can gradually make the inferred values of the hidden Brownian motion approach the average value of the data. This is because as we increase the smoothing parameter, we allow less and less of the variance to be allocated to the Brownian motion, so eventually it approaches the process which almost doesn't change over the domain of $x$:
158+
By increasing the smoothing parameter, we can gradually make the inferred values of the hidden Brownian motion approach the average value of the data. This is because as we increase the smoothing parameter, we allow less and less of the variance to be allocated to the Brownian motion, so eventually it approaches the process which almost doesn't change over the domain of $x$:
159159

160160
```{code-cell} ipython3
161161
fig, axes = subplots(2, 2)

0 commit comments

Comments
 (0)