Skip to content

Commit 27c892e

Browse files
committed
up
1 parent 4d9d7d8 commit 27c892e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/src/inverse_problems/petab_ode_param_fitting.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -431,19 +431,19 @@ And one additional optional argument:
431431
Because `calibrate_model_multistart` handles initial guess sampling, unlike for `calibrate_model`, no initial guess has to be provided.
432432

433433
Here, we fit parameters through 10 independent optimisation runs, using QuasiMonteCarlo's `SobolSample` method, and save the result to the OptimizationRuns folder:
434-
```@example petab1
434+
```julia
435435
using Optim
436436
using QuasiMonteCarlo
437437
res_ms = calibrate_model_multistart(petab_problem, IPNewton(), 10, "OptimizationRuns"; sampling_method=QuasiMonteCarlo.SobolSample())
438438
```
439439
The best result across all runs can still be retrieved using `get_ps(res_ms, petab_problem)`, with the results of the individual runs being stored in the `res_ms.runs` field.
440440

441441
To load the result in a later session, we can call:
442-
```@example petab1
442+
```julia
443443
res_ms = PEtabMultistartOptimisationResult("OptimizationRuns")
444444
```
445445
where `"OptimizationRuns"` is the name of the save directory (specified in `calibrate_model_multistart`). If the OptimizationRuns folder contains the output from several runs, we can designate which to load using the `which_run` argument. Here we load the second run to be saved in that folder:
446-
```@example petab1
446+
```julia
447447
res_ms = PEtabMultistartOptimisationResult("OptimizationRuns"; which_run="2")
448448
```
449449
By default, `which_run` loads the first run saved to that directory.
@@ -488,7 +488,7 @@ nothing # hide
488488
![petab single best objective plot](../assets/petab_best_objective_single_run.svg)
489489

490490
For a multi-start calibration run, the default output is instead a so-called waterfall plot:
491-
```@example petab1
491+
```julia
492492
plot(res_ms)
493493
nothing # hide
494494
```
@@ -499,7 +499,7 @@ nothing # hide
499499
In the waterfall plot, each dot shows the final objective value for a single run in the multi-start process. The runs are ordered by their objective values, and colours designate runs in the same local minimum. A common use of waterfall plots is to check whether a sufficient number of runs (typically $>5$) has converged to the same best local minimum (in which case it is assumed to be the *global* minimum).
500500

501501
To instead use the best objective value plot for a multi-start run (with one curve for each run), the `plot_type` argument is used:
502-
```@example petab1
502+
```julia
503503
plot(res_ms; plot_type = :best_objective)
504504
nothing # hide
505505
```

0 commit comments

Comments
 (0)