Data2Dynamics / d2d

a modeling environment tailored to parameter estimation in dynamical systems
https://github.com/Data2Dynamics/d2d
57 stars 29 forks source link

measurement distribution #105

Closed mikeaalv closed 6 years ago

mikeaalv commented 6 years ago

It seems to me that for the measurement, the most I can do is set a noise/sd. The distribution is limited to normal or log normal. Is there any way to do it with a poisson or negative binomial distribution? I'd like to do that as measurement process in my model is like that.

hhass commented 6 years ago

Hi Yue,

you can implement other distributions yourself, but you have to adapt the calculation of residuals and the optimization algorithm (and using fmincon instead of lsqnonlin which is only suitable for log(gauß-distributed) ~ least-squares). An example using the Laplace distribution is given in the folder 'Examples/ToyModels/ABC_toyModel_Laplace'. There is a readme, as well.

mikeaalv commented 6 years ago

Thanks a lot!