# Parameters optimization profiles

**URL:** <https://discourse.julialang.org/t/parameters-optimization-profiles/6141>\
**Category:** Optimization (Mathematical)\
**Tags:** diffeq, optim\
**Created:** [September 28, 2017, 3:46pm UTC](https://discourse.julialang.org/t/parameters-optimization-profiles/6141 "2017-09-28T15:46:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivborissov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ivborissov/32/2841_2.png) [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Post date:** [September 28, 2017, 3:46pm UTC](https://discourse.julialang.org/t/parameters-optimization-profiles/6141/1 "2017-09-28T15:46:45Z")

</div>

Hi, has anyone solved the following optimization problem: I am estimating ODE parameters (using NLopt) like `param1,param2,param3` and I want to create “profiles” of each parameter. It means estimate `param2` and `param3` for different fixed values of `param1` and plot `cost_value(param1)` and the same for `param2` and `param3`. Of course it seems quite easy to code but I am not sure how to implement adaptive stepsize control here etc. I guess the problem is called “partial likelihood”. Has anyone seen julia tools/articles on this problem?

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [September 29, 2017, 12:49pm UTC](https://discourse.julialang.org/t/parameters-optimization-profiles/6141/2 "2017-09-29T12:49:57Z")

</div>

Let me see if I got this right. You’re optimizing `param2` and `param3` for given values of `param1` and keeping `(param1,param2,param3,cost)` to make some kind of plot (presumably using NLopt on the DiffEq tools), and you want to find out the best algorithm for picking `param1`s efficiently such that you get a good graph out, calculating the values at least amount of `param1`s as possible? The baseline is to just make an even grid of `param1`s of course. But to get fancy, you might want to take some heuristics out of this:

[https://github.com/JuliaPlots/Plots.jl/issues/621](https://github.com/JuliaPlots/Plots.jl/issues/621)

and maybe those can help you identify the portions of the likelihood that are more prone to change and reduce the number of required `param1`s by focusing on specific areas.

---

<div class="post-metadata">

**Author:** ![ivborissov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ivborissov/32/2841_2.png) [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Post date:** [September 29, 2017, 1:53pm UTC](https://discourse.julialang.org/t/parameters-optimization-profiles/6141/3 "2017-09-29T13:53:58Z")

</div>

Chris, thanks for you response!  
In general this method is called “Profile likelihood” and it is one of the approaches of identifiability analysis of ODE (or any Dynamical model) parameters.  
The idea of the method is to re-optimize the problem fixing the values of one of the parameters (ex, `param1`) and to plot `best_cost(param1)` to say smth about sensitivity and identifiability of `param1`.  
It is described in a number of articles:

> **[Structural and practical identifiability analysis of partially observed...](https://academic.oup.com/bioinformatics/article/25/15/1923/213246)**
>
> Abstract. Motivation: Mathematical description of biological reaction networks by differential equations leads to large models whose parameters are calibrated i

And one of the algorithm used is described in the supplementary materials of this article.  
The authors implemented this approach in the following matlab tool:

> **[Uncertainty analysis](https://github.com/Data2Dynamics/d2d/wiki/Uncertainty-analysis)**
>
> a modeling environment tailored to parameter estimation in dynamical systems - Data2Dynamics/d2d

The main question as you have mentioned is the right choice of `param1s` because each optimization is computationally “expensive”.  
I ll try to figure out if adaptive plotting can help here.  
If our optimization pkgs have optimizers which include this functionality please let me know)

---

<div class="post-metadata">

**Author:** ![ivborissov](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ivborissov/32/2841_2.png) [@ivborissov](https://discourse.julialang.org/u/ivborissov)\
**Post date:** [October 6, 2017, 10:53am UTC](https://discourse.julialang.org/t/parameters-optimization-profiles/6141/4 "2017-10-06T10:53:27Z")

</div>

@ChrisRackauckas thanks a lot for the link, `adapted_grid` from PlotUtils is a great solution here
