Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions doc/example/getting_started.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@
"name": "#%% md\n"
}
},
"source": "Define lower and upper parameter bounds and create an optimization problem."
"source": [
"Define lower and upper parameter bounds and create an optimization problem."
]
},
{
"cell_type": "code",
Expand Down Expand Up @@ -621,6 +623,15 @@
"The maximum projections can now be inspected via:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"problem.x_scales"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -632,7 +643,7 @@
"outputs": [],
"source": [
"# adapt x_labels.\n",
"x_labels = [f\"Log10({name})\" for name in problem.x_names]\n",
"x_labels = [f\"Log({name})\" for name in problem.x_names]\n",
"\n",
"ax = visualize.profiles(result, x_labels=x_labels, show_bounds=True)\n",
"# visualize optimal parameter values\n",
Expand All @@ -650,6 +661,22 @@
")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The 2D profile visualization shows joint parameter paths across all profile pairs. Diagonal plots show 1D profiles (likelihood ratio vs. parameter value). Off-diagonal plots show how each non-profiled parameter moves while another is profiled, with color indicating the likelihood ratio.\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"fig, axes = pypesto.visualize.visualize_2d_profile(result)"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand All @@ -675,7 +702,7 @@
" result, confidence_level=0.95, show_bounds=True\n",
")\n",
"\n",
"ax.set_xlabel(\"Log10(Parameter value)\");"
"ax.set_xlabel(\"Log(Parameter value)\");"
]
},
{
Expand All @@ -695,7 +722,7 @@
" result, confidence_levels=[0.99, 0.95, 0.9]\n",
")\n",
"\n",
"ax.set_xlabel(\"Log10(Parameter value)\");"
"ax.set_xlabel(\"Log(Parameter value)\");"
]
},
{
Expand Down
8 changes: 7 additions & 1 deletion pypesto/visualize/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,13 @@
parameters_lowlevel,
)
from .profile_cis import profile_cis, profile_nested_cis
from .profiles import profile_lowlevel, profiles, profiles_lowlevel
from .profiles import (
profile_lowlevel,
profile_lowlevel_2d,
profiles,
profiles_lowlevel,
visualize_2d_profile,
)
from .reference_points import ReferencePoint, create_references
from .sampling import (
sampling_1d_marginals,
Expand Down
Loading