Skip to content

Commit

Permalink
add viz notebook to rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
dilpath committed Nov 18, 2024
1 parent f3ef04e commit 14adba0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Various example notebooks.
:maxdepth: 1

examples/example_cli_famos.ipynb
examples/visualization.ipynb
examples/workflow_cli.ipynb
examples/workflow_python.ipynb
13 changes: 11 additions & 2 deletions petab_select/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
NORMAL_NODE_COLOR = "darkgrey"


__all__ = [
"bar_criterion_vs_models",
"graph_history",
"graph_iteration_layers",
"line_selected",
"scatter_criterion_vs_n_estimated",
"upset",
]


def default_label_maker(model: Model) -> str:
"""Create a model label, for plotting."""
return model.model_hash[:4]
Expand Down Expand Up @@ -86,10 +96,9 @@ def upset(
The plot axes (see documentation from the `upsetplot` package).
"""
# Get delta criterion values
values = np.array(
values = get_relative_criterion_values(
[model.get_criterion(Criterion.AICC) for model in models]
)
values -= values.min()

# Sort by criterion value
index = np.argsort(values)
Expand Down

0 comments on commit 14adba0

Please sign in to comment.