SciML / SciMLSensitivity.jl

A component of the DiffEq ecosystem for enabling sensitivity analysis for scientific machine learning (SciML). Optimize-then-discretize, discretize-then-optimize, adjoint methods, and more for ODEs, SDEs, DDEs, DAEs, etc.
https://docs.sciml.ai/SciMLSensitivity/stable/
Other
332 stars 70 forks source link

Elegantly deal with param_range having parameters with no variance #233

Open MFairley opened 4 years ago

MFairley commented 4 years ago

Currently, at least with RegressionGSA, if a user specifics a parameter with no variance e.g. param_range = [(10,10)] then gsa fails with an opaque error message. For RegressionGSA the error looks like

** On entry to DLASCLS parameter number 4 had an illegal value

because the design matrix has a row with a parameter having all the same value.

Perhaps a check for parameter ranges with 0 variance before running gsa would be helpful?

Vaibhavdixit02 commented 4 years ago

The error can definitely be more informative, I'll look into that.

Handling fixed parameters is something that has been discussed before, my recommendation is to actually avoid this and instead create a wrapper function that only takes the parameters that vary and pass in the fixed parameters explicitly. For clarity this is sort of what I recommend

function(varying_params)
 original_func([varying_params[1], varying_params[2],..10,...,
varying_params[n-1],varying_params[n])
end

And only pass the ranges for those parameters that vary.

On Thu, Apr 16, 2020 at 10:08 PM Michael Fairley notifications@github.com wrote:

Currently, at least with RegressionGSA, if a user specifics a parameter with no variance e.g. param_range = [(10,10)] then gsa fails with an opaque error message. For RegressionGSA the error looks like

** On entry to DLASCLS parameter number 4 had an illegal value

because the design matrix has a row with a parameter having all the same value.

Perhaps a check for parameter ranges with 0 variance before running gsa would be helpful?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SciML/DiffEqSensitivity.jl/issues/233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQQF3SNC2ILL2ZJSYO3QKLRM4X7DANCNFSM4MJ4IKLA .

-- Vaibhav Kumar Dixit Mathematics and Computing Indian Institute of Technology (B.H.U.) Varanasi, India

Vaibhavdixit02 commented 4 years ago

I apologise for the bad formatting, I am locked out of GitHub right now, will probably get access in a couple of days. :)

On Thu, Apr 16, 2020 at 11:00 PM Vaibhav Dixit vaibhavyashdixit@gmail.com wrote:

The error can definitely be more informative, I'll look into that.

Handling fixed parameters is something that has been discussed before, my recommendation is to actually avoid this and instead create a wrapper function that only takes the parameters that vary and pass in the fixed parameters explicitly. For clarity this is sort of what I recommend

function(varying_params)
 original_func([varying_params[1], varying_params[2],..10,...,
varying_params[n-1],varying_params[n])
end

And only pass the ranges for those parameters that vary.

On Thu, Apr 16, 2020 at 10:08 PM Michael Fairley notifications@github.com wrote:

Currently, at least with RegressionGSA, if a user specifics a parameter with no variance e.g. param_range = [(10,10)] then gsa fails with an opaque error message. For RegressionGSA the error looks like

** On entry to DLASCLS parameter number 4 had an illegal value

because the design matrix has a row with a parameter having all the same value.

Perhaps a check for parameter ranges with 0 variance before running gsa would be helpful?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SciML/DiffEqSensitivity.jl/issues/233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFQQF3SNC2ILL2ZJSYO3QKLRM4X7DANCNFSM4MJ4IKLA .

-- Vaibhav Kumar Dixit Mathematics and Computing Indian Institute of Technology (B.H.U.) Varanasi, India

-- Vaibhav Kumar Dixit Mathematics and Computing Indian Institute of Technology (B.H.U.) Varanasi, India