You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/catalyst_applications/simulation_structure_interfacing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ oprob[:X1] = 10.0
33
33
```
34
34
with parameters using the same notation.
35
35
36
-
#### Remaking problems using the `remake` function
36
+
#### [Remaking problems using the `remake` function](@id simulation_structure_interfacing_remake)
37
37
Typically, when modifying problems, it is recommended to use the `remake` function. Unlike when we do `oprob[:X1] = 10.0` (which modifies the problem in question), `remake` creates a new problem object. The `remake` function takes a problem as input, and any fields you wish to modify (and their new values) as optional inputs. Thus, we can do:
The parameters of a model, generated by Catalyst, can be estimated using various
3
-
packages available in the Julia ecosystem. Refer
4
-
[here](https://docs.sciml.ai/Overview/stable/highlevels/inverse_problems/) for
5
-
more extensive information. Below follows a quick tutorial of how
6
-
[Optimization.jl](https://docs.sciml.ai/Optimization/stable/) can be used to fit
7
-
a parameter set to data.
1
+
# [Fitting Parameters for an Oscillatory System](@id parameter_estimation)
2
+
In this example we will use [Optimization.jl](https://github.com/SciML/Optimization.jl) to fit the parameters of an oscillatory system (the Brusselator) to data. Here, special consideration is taken to avoid reaching a local minimum. Instead of fitting the entire time series directly, we will start with fitting parameter values for the first period, and then use those as an initial guess for fitting the next (and then these to find the next one, and so on). Using this procedure is advantageous for oscillatory systems, and enables us to reach the global optimum.
8
3
9
4
First, we fetch the required packages.
10
5
```@example pe1
11
6
using Catalyst
12
-
using DifferentialEquations
13
-
using SciMLSensitivity
7
+
using OrdinaryDiffEq
14
8
using Optimization
15
-
16
-
# for the ADAM optimizer
17
-
using OptimizationOptimisers
9
+
using OptimizationOptimisers # Required for the ADAM optimizer.
10
+
using SciMLSensitivity # Required for `Optimization.AutoZygote()` automatic differentiation option.
18
11
```
19
12
20
-
Next, we declare our model. For our example, we will use the Brusselator, a
21
-
simple oscillator.
13
+
Next, we declare our model, the Brusselator oscillator.
22
14
```@example pe1
23
15
brusselator = @reaction_network begin
24
16
A, ∅ --> X
@@ -27,10 +19,11 @@ brusselator = @reaction_network begin
27
19
1, X --> ∅
28
20
end
29
21
p_real = [:A => 1., :B => 2.]
22
+
nothing # hide
30
23
```
31
24
32
25
We simulate our model, and from the simulation generate sampled data points
33
-
(with added noise), to which we will attempt to fit a parameter et.
26
+
(to which we add noise). We will use this data to fit the parameters of our model.
0 commit comments