Skip to content

Commit 9f484ef

Browse files
committed
improve display
1 parent 54a13cc commit 9f484ef

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
@@ -103,7 +103,8 @@ nothing # hide
103103
### Fitting parameters
104104
We are now able to fit our model to the data. First, we create a `PEtabODEProblem`. Here, we use `petab_model` as the only input, but it is also possible to set various [numeric solver and automatic differentiation options](@ref petab_simulation_options) (such as method or tolerance).
105105
```@example petab1
106-
petab_problem = PEtabODEProblem(petab_model; verbose=false); nothing # hide
106+
petab_problem = PEtabODEProblem(petab_model; verbose=false) # hide
107+
nothing # hide
107108
```
108109
```julia
109110
petab_problem = PEtabODEProblem(petab_model)
@@ -115,6 +116,7 @@ To fit a parameter set we use the `calibrate_model` function. In addition to our
115116
using Optim
116117
p0 = generate_startguesses(petab_problem, 1)
117118
p0 = [0.0, 0.0, 0.0] # hide
119+
res = calibrate_model(petab_problem, p0, IPNewton()) # hide
118120
res = calibrate_model(petab_problem, p0, IPNewton())
119121
```
120122

@@ -382,10 +384,7 @@ While in our basic example, we do not provide any additional information to our
382384

383385
Here is an example, taken from the [more detailed PEtab.jl documentation](https://sebapersson.github.io/PEtab.jl/dev/Boehm/#Creating-a-PEtabODEProblem)
384386
```@example petab1
385-
PEtabODEProblem(petab_model,
386-
ode_solver=ODESolver(Rodas5P(), abstol=1e-8, reltol=1e-8),
387-
gradient_method=:ForwardDiff,
388-
hessian_method=:ForwardDiff, verbose=false); nothing # hide
387+
PEtabODEProblem(petab_model, ode_solver=ODESolver(Rodas5P(), abstol=1e-8, reltol=1e-8), gradient_method=:ForwardDiff, hessian_method=:ForwardDiff, verbose=false); nothing # hide
389388
```
390389
```julia
391390
PEtabODEProblem(petab_model,
@@ -484,6 +483,7 @@ Here, the event only triggers whenever the condition changes from `false` to `tr
484483

485484
Whenever we have several events or not, we bundle them together in a single vector which is later passed to the `PEtabODEProblem` using the `events` argument:
486485
```@example petab1
486+
params = [par_kB, par_kD, par_kP] # hide
487487
events = [event1, event2]
488488
petab_model = PEtabModel(rn, observables, measurements, params; state_map=u0, events=events)
489489
nothing # hide

0 commit comments

Comments
 (0)