Skip to content

Commit

Permalink
reference DiffEqFlux and mentione final parameter set.
Browse files Browse the repository at this point in the history
  • Loading branch information
TorkelE committed Feb 17, 2021
1 parent 0154d6b commit 0c9535c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/src/tutorials/parameter_estimation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Parameter Estimation
The parameters of a model, generated by Catalyst, can be fitted using various packages available in the Julia ecosystem. Refer [here](https://diffeq.sciml.ai/stable/analysis/parameter_estimation/) for a more detailed description. Below follows a quick tutorial of how a parameter set for a model can be fitted to data.
The parameters of a model, generated by Catalyst, can be estimated using various packages available in the Julia ecosystem. Refer [here](https://diffeq.sciml.ai/stable/analysis/parameter_estimation/) for a more detailed description. Below follows a quick tutorial of how [DiffEqFlux](https://diffeqflux.sciml.ai/dev/) can be used to fit a parameter set to data.

First, we fetch the required packages.
```julia
Expand Down Expand Up @@ -88,6 +88,9 @@ plot!(sol_estimate,color=[:darkblue :darkred], linestyle=:dash,lw=3,label=["X es
```
![parameter_estimation_plot4](../assets/parameter_estimation_plot4.svg)

The final parameter set becomes `[0.9996559014056948, 2.005632696191224]` (the real one was [1.0, 2.0]`).


The reason we chose to fit the model on a smaller interval to begin with, and then extend the interval, is to avoid getting stuck in a local minimum. Here specifically, we chose our initial interval to be smaller than a full cycle of the oscillation. If we had chosen to fit a parameter set on the full interval immediately we would have received an inferior solution.
```julia
p_estimate = optimise_p([5.,5.],30.).minimizer
Expand Down

0 comments on commit 0c9535c

Please sign in to comment.