petab_select.analyze
Methods to analyze results of model selection.
Functions
|
Compute criterion weights. |
|
Get the best model. |
|
Get the best model of each iteration. |
|
Get a graph representation of the models in terms of their ancestry. |
|
Get the differences in parameters betweem models and their predecessors. |
|
Group models by their iteration. |
|
Group models by their predecessor model. |
- petab_select.analyze.compute_weights(models, criterion, as_dict=False)[source]
Compute criterion weights.
N.B.: regardless of the criterion, the formula used is the Akaike weights formula, but with
criterionvalues instead of the AIC.
- petab_select.analyze.get_best_by_iteration(models, *args, **kwargs)[source]
Get the best model of each iteration.
See :func:
get_bestfor additional required arguments.
- petab_select.analyze.get_graph(models, labels=None)[source]
Get a graph representation of the models in terms of their ancestry.
Edges connect models with their predecessor models.
- petab_select.analyze.get_parameter_changes(models, as_dict=False)[source]
Get the differences in parameters betweem models and their predecessors.
- Parameters:
- Return type:
dict[ModelHash,list[tuple[set[str],set[str]]]] |list[tuple[set[str],set[str]]]- Returns:
The parameter changes. Each model has a 2-tuple of sets of parameters. The first and second sets are the added and removed parameters, respectively. If the predecessor model is undefined (e.g. the
VIRTUAL_INITIAL_MODEL), then both sets will be empty.