simetenn / uncertainpy

Uncertainpy: a Python toolbox for uncertainty quantification and sensitivity analysis, tailored towards computational neuroscience.
http://uncertainpy.readthedocs.io
GNU General Public License v3.0
220 stars 50 forks source link

Uncertainpy. for coupled differential equations #42

Closed skhan1020 closed 4 years ago

skhan1020 commented 4 years ago

Can uncertainpy be used to calculate uncertainties in coupled differential systems ? At present, it seems like this feature is not supported.

simetenn commented 4 years ago

Yes, Uncertainpy treats the model as a black box and can be used to calculate the uncertainties in such systems.

skhan1020 commented 4 years ago

Thanks a lot! I can get it to work now. I do have a couple of questions -

  1. In the coffee_cup example, is the uncertainty being calculated using the Polynomial Chaos Expansion (PCE) by default ?
  2. The Sobol Indices calculated using uncertainpy are turning out to be different from the ones directly calculated from SALib library. Is there a reason for this ?

Souratosh.

On Sun, 3 May 2020 at 22:00, Simen Tennøe notifications@github.com wrote:

Yes, Uncertainpy treats the model as a black box and can be used to calculate the uncertainties in such systems.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/simetenn/uncertainpy/issues/42#issuecomment-623257716, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5MTGJNIGYKETCOSKDDKILRPZDWJANCNFSM4MQJHWWQ .

simetenn commented 4 years ago

Hi, sorry for the delayed answer.

  1. Yes, the Polynomial Chaos Expansion is the default method used.
  2. There can be a couple of reasons, but it is hard to say without more information. If you use Sobol Indices calculated using PCE then there might be a difference due to different methods, as neither method gives you the analytical solution. If you use the Monte Carlo method Uncertainpy uses a version of SALib, so they should be similar. But there might be differences due the arguments used in Uncertainpy vs the arguments used in the SALib method. There are also random numbers involved which can cause of some differences.