Skip to content

Commit

Permalink
Updating the notebooks (#1470)
Browse files Browse the repository at this point in the history
* 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 <59329744+dilpath@users.noreply.github.com>

* Update doc/example/getting_started.ipynb

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>

* Adjusted amici logo

* Removed pyswarms from waterfall visualization

* Fixed a random seed for sampling notebook

---------

Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
  • Loading branch information
PaulJonasJost and dilpath authored Oct 8, 2024
1 parent c5a46d4 commit b2cde8c
Show file tree
Hide file tree
Showing 20 changed files with 765 additions and 275 deletions.
296 changes: 269 additions & 27 deletions doc/example/amici.ipynb

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions doc/example/censored_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "dev_venv",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -251,7 +251,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.2"
"version": "3.12.3"
},
"vscode": {
"interpreter": {
Expand All @@ -260,5 +260,5 @@
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
9 changes: 5 additions & 4 deletions doc/example/conversion_reaction.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
},
"outputs": [],
"source": [
"%%time\n",
"# create objective function from amici model\n",
"# pesto.AmiciObjective is derived from pesto.Objective,\n",
"# the general pesto objective function class\n",
Expand All @@ -157,7 +158,7 @@
"\n",
"# do the optimization\n",
"result = optimize.minimize(\n",
" problem=problem, optimizer=optimizer, n_starts=100, filename=None\n",
" problem=problem, optimizer=optimizer, n_starts=10, filename=None\n",
")"
]
},
Expand Down Expand Up @@ -221,7 +222,7 @@
" problem=problem,\n",
" result=result,\n",
" optimizer=optimizer,\n",
" profile_index=np.array([1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0]),\n",
" profile_index=np.array([0,1]),\n",
" result_index=0,\n",
" profile_options=profile_options,\n",
" filename=None,\n",
Expand Down Expand Up @@ -270,7 +271,7 @@
")\n",
"\n",
"result = sample.sample(\n",
" problem, n_samples=10000, sampler=sampler, result=result, filename=None\n",
" problem, n_samples=1000, sampler=sampler, result=result, filename=None\n",
")"
]
},
Expand Down Expand Up @@ -425,7 +426,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.12.3"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit b2cde8c

Please sign in to comment.