Skip to content

Commit b2cde8c

Browse files
Updating the notebooks (#1470)
* shortening many optimizations. Replacing Boehm with conversion reaction where possible. Thermodynamic more robust. * Correctly install pyswarms in notebooks1 * renamed "model_conversion_reaction" to "conversion_reaction" according to naming scheme in benchmark models as well * Revert "renamed "model_conversion_reaction" to "conversion_reaction" according to naming scheme in benchmark models as well" This reverts commit a1a54f7. * reverted changes and kept original structure. adjusted amici.ipynb * changed directory * changed directory II * Start out with boehm, for optimization etc change to conversion reaction * fixed custom_objective_function * for now: more starts with pyswarms. * changed julia notebooks ever so slightly. * Revert changes to julia notebook * Integrate comments * Correct PEtab logo now. * Update doc/example/getting_started.ipynb Co-authored-by: Dilan Pathirana <[email protected]> * Update doc/example/getting_started.ipynb Co-authored-by: Dilan Pathirana <[email protected]> * Adjusted amici logo * Removed pyswarms from waterfall visualization * Fixed a random seed for sampling notebook --------- Co-authored-by: Dilan Pathirana <[email protected]>
1 parent c5a46d4 commit b2cde8c

20 files changed

+765
-275
lines changed

doc/example/amici.ipynb

+269-27
Large diffs are not rendered by default.

doc/example/censored_data.ipynb

+3-3
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
],
238238
"metadata": {
239239
"kernelspec": {
240-
"display_name": "dev_venv",
240+
"display_name": "Python 3 (ipykernel)",
241241
"language": "python",
242242
"name": "python3"
243243
},
@@ -251,7 +251,7 @@
251251
"name": "python",
252252
"nbconvert_exporter": "python",
253253
"pygments_lexer": "ipython3",
254-
"version": "3.11.2"
254+
"version": "3.12.3"
255255
},
256256
"vscode": {
257257
"interpreter": {
@@ -260,5 +260,5 @@
260260
}
261261
},
262262
"nbformat": 4,
263-
"nbformat_minor": 2
263+
"nbformat_minor": 4
264264
}

doc/example/conversion_reaction.ipynb

+5-4
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@
144144
},
145145
"outputs": [],
146146
"source": [
147+
"%%time\n",
147148
"# create objective function from amici model\n",
148149
"# pesto.AmiciObjective is derived from pesto.Objective,\n",
149150
"# the general pesto objective function class\n",
@@ -157,7 +158,7 @@
157158
"\n",
158159
"# do the optimization\n",
159160
"result = optimize.minimize(\n",
160-
" problem=problem, optimizer=optimizer, n_starts=100, filename=None\n",
161+
" problem=problem, optimizer=optimizer, n_starts=10, filename=None\n",
161162
")"
162163
]
163164
},
@@ -221,7 +222,7 @@
221222
" problem=problem,\n",
222223
" result=result,\n",
223224
" optimizer=optimizer,\n",
224-
" profile_index=np.array([1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0]),\n",
225+
" profile_index=np.array([0,1]),\n",
225226
" result_index=0,\n",
226227
" profile_options=profile_options,\n",
227228
" filename=None,\n",
@@ -270,7 +271,7 @@
270271
")\n",
271272
"\n",
272273
"result = sample.sample(\n",
273-
" problem, n_samples=10000, sampler=sampler, result=result, filename=None\n",
274+
" problem, n_samples=1000, sampler=sampler, result=result, filename=None\n",
274275
")"
275276
]
276277
},
@@ -425,7 +426,7 @@
425426
"name": "python",
426427
"nbconvert_exporter": "python",
427428
"pygments_lexer": "ipython3",
428-
"version": "3.9.7"
429+
"version": "3.12.3"
429430
}
430431
},
431432
"nbformat": 4,

0 commit comments

Comments
 (0)