# DiffEqSensitivity Parameter ranges

**URL:** <https://discourse.julialang.org/t/diffeqsensitivity-parameter-ranges/22435>\
**Category:** Numerics\
**Tags:** diffeq\
**Created:** [March 27, 2019, 10:54pm UTC](https://discourse.julialang.org/t/diffeqsensitivity-parameter-ranges/22435 "2019-03-27T22:54:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![alewolf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alewolf/32/9000_2.png) [@alewolf](https://discourse.julialang.org/u/alewolf)\
**Post date:** [March 27, 2019, 10:54pm UTC](https://discourse.julialang.org/t/diffeqsensitivity-parameter-ranges/22435/1 "2019-03-27T22:54:36Z")

</div>

Hi,  
I’ve been working with DifferentialEquations Package -  
I am ready to run some global sensitivity analysis (GSA)

I noticed that the way to input the ranges of evaluation goes something like this  
Let’s say my parameter p=1 and I want to calculate GSA using morris.sensitivity on a logarithmic range between 1/100 and 100

for example-  
Let’s say

```julia
t = collect(range(0, stop=10, length=20))
p=1
p_range = [p/100, p*100]
psteps =11
# m = DiffEqSensitivity.morris_sensitivity(An_ODE_tProb,Rodas5(),t,p_ranges,p_steps, relative_scale=false)

```

If I am correct the range on which Morris will be evaluated for p is equivalent to

```julia
collect(range(1.0/100, length=11, stop=1.0*100))

```

11-element Array{Float64,1}:  
0.01  
10.009  
20.008  
30.007  
40.006  
50.005  
60.004  
70.003  
80.002  
90.001  
100.0

Is this correct?

If this is true consider that a logscale would be a better range to sample through the different  
orders of magnitude for the parameter in question-  
for example-  
something like this

```julia
10 .^range(log10(p/100), length=11, stop=log10(p*100))

```

samples through  
11-element Array{Float64,1}:  
0.01  
0.025118864315095794  
0.06309573444801933  
0.15848931924611132  
0.3981071705534972  
1.0  
2.51188643150958  
6.309573444801933  
15.848931924611133  
39.810717055349734  
100.0

Am I right that the parameter space is divided linearly and not logarithmic?  
If so is there a way anyone can think to specify a logarithmic range for the parameter space given that  
DiffEqSensitivity.morris\_sensitivity takes a list of lower and upper limits and number of steps for each parameter and not a simple list of values?

thanks

A

---

<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:** [March 28, 2019, 1:02am UTC](https://discourse.julialang.org/t/diffeqsensitivity-parameter-ranges/22435/2 "2019-03-28T01:02:54Z")

</div>

Actually now that I read this more, it sounds like a feature suggestion. You can just use the exp of the parameter for now if you want it to act like this.

---

<div class="post-metadata">

**Author:** ![alewolf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alewolf/32/9000_2.png) [@alewolf](https://discourse.julialang.org/u/alewolf)\
**Post date:** [March 28, 2019, 1:19am UTC](https://discourse.julialang.org/t/diffeqsensitivity-parameter-ranges/22435/3 "2019-03-28T01:19:20Z")

</div>

Not sure that would work as the stepping between lower and upper limit will still be linear correct?  
My interest is that the sampling between the upper and lower bounds be traveled logarithmically

For example between 10 and 1000 with 3 steps  
I’d like to get 10,100,1000 - instead of 10, 505 and 1000

If I do say 10 .^range(1,3,3) for range and  
steps = 3  
Wouldn’t the function first do the 10 .^ and then divide the interval, leading to the same linear result?

Thanks : )

Enjoy your trip : )

PS- ppl at my work has expressed an interest on having you come for a talk. If that interest you let me know and we can set up something up.

Take care

---

<div class="post-metadata">

**Author:** ![Vaibhavdixit02](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vaibhavdixit02/32/2916_2.png) [@Vaibhavdixit02](https://discourse.julialang.org/u/Vaibhavdixit02)\
**Post date:** [March 28, 2019, 8:56pm UTC](https://discourse.julialang.org/t/diffeqsensitivity-parameter-ranges/22435/4 "2019-03-28T20:56:15Z")

</div>

This could be a good addition, I have created an issue for it here [Logarithmic ranges in Morris method · Issue #12 · SciML/GlobalSensitivity.jl · GitHub](https://github.com/JuliaDiffEq/DiffEqSensitivity.jl/issues/50).

---

<div class="post-metadata">

**Author:** ![alewolf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alewolf/32/9000_2.png) [@alewolf](https://discourse.julialang.org/u/alewolf)\
**Post date:** [March 28, 2019, 9:23pm UTC](https://discourse.julialang.org/t/diffeqsensitivity-parameter-ranges/22435/5 "2019-03-28T21:23:17Z")

</div>

Thanks !

A
