I have the system which is described by several ODE. The solution looks good for me. Now I need to implement the sensitivity analyses of parameters which I used in the model. Therefore, I have the following questions:

  1. I have an output in the form of the vector(solution in time). But the sensitivity routines (such SALib) requires the output to be scalar variable $F(X)$ but not a vector. What should I do? I found in several resources that they model some "true" solution without any variance in parameters and later (when they perform the sensitivity) they compare it with "true" solution via RMSD. Is it correct way of doing that? (could you provide some references)

  2. Parameter boundaries: how to choose the range of parameters? In the some papers the modelers do just ±5% of their values of parameters. What is the most typical way of doing this? based on the literature values and taking [min-5% ; max+5%] will be good? What if I dont have any literature values?

  • $\begingroup$ Can you add more context, please? I am confused by the following: some ODE libraries such as Sundials can do sensitivity analyses (forward-/adjoint-mode) by solving the appropriate differentiated ODEs - this is much more efficient than doing that for a completely general model, which is why your question (2) looks odd to me. Is this just missing from SALib (I'm not familiar with it) or other libraries you looked at? Re (1) could it be that SALib simply only works on scalar functions, requiring you to run $p$ analyses for a system of $p$ ODEs? This looks like a very library-specific question. $\endgroup$ – Kirill Sep 2 '15 at 3:37
  • $\begingroup$ (1) For ODE solver I am using the PHREEQC where you specife the ODE in the text file and it gives you the solution(vector of concentration in time) of complex chemical system. There is a possibility to run PHREEQC in python and to obtain the solution there. (2) SAlib works only with scalars. therefore, I am returning the RMSD value. It would be nice if you could advise different approach. $\endgroup$ – Igor Markelov Sep 2 '15 at 9:30
  • $\begingroup$ How many parameters and output variables do you have? $\endgroup$ – Kirill Sep 2 '15 at 16:21
  • $\begingroup$ 3 parameters 1 variable $\endgroup$ – Igor Markelov Sep 2 '15 at 16:49
  • $\begingroup$ I think this question, while valid, is somewhat ambiguous due to the issues Kirill raises. There are several methods for performing "sensitivity analysis", depending on how they interpret the phrase. These include solving for derivatives of the ODE solution with respect to parameters, perturbing parameters, and methods like Fourier amplitude sensitivity testing. The literature also draws distinctions between "local" sensitivity analysis (e.g., calculating derivatives) and "global" sensitivity analysis (e.g., how the solution is affected by large parameter pertubations). $\endgroup$ – Geoff Oxberry Sep 2 '15 at 18:44
  1. There are 2 possibilities:

    (A) Somehow aggregate the time series into a single number. If you have a "true" solution, yes you can calculate RMS error or some other error measure. If you don't have a true solution to compare against, you can aggregate using some other meaningful statistic (like the sum, or the peak, etc. depending on the application). But in general in this case you're calculating the sensitivity of just one number representing the whole time series.

    (B) Or, you can calculate the sensitivity of the output value at every timestep. You would create a loop and analyze for every timestep. This is more computationally intensive, but can result in some more dynamic information.


    Herman, J. D., Kollat, J. B., Reed, P. M., & Wagener, T. (2013). From maps to movies: high-resolution time-varying sensitivity analysis for spatially distributed watershed models. Hydrology and Earth System Sciences, 17(12), 5109–5125.

    van Werkhoven, K., Wagener, T., Reed, P., & Tang, Y. (2008). Characterization of watershed model behavior across a hydroclimatic gradient. Water Resources Research, 44(1).

  2. As for the parameter boundaries, that is very important and very domain-specific. First look and see if you can find some ranges from another paper where they used your model, and cite those. If not, choosing a percent value is okay, but 5% seems a bit narrow -- you might try 10% instead. The most important thing is that your outputs still make sense. If your ranges produce parameter samples that are "non-physical", in other words the output has no bearing on reality anymore, then you should narrow them. There is a lot of subjectivity here and it can change your results quite a bit.

(c) Jon Herman, the creator of SALib


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.