mattja / sdeint

Numerical integration of Ito or Stratonovich SDEs
GNU General Public License v3.0
155 stars 25 forks source link

Examples #4

Open yoavram opened 8 years ago

yoavram commented 8 years ago

Great package, works very well. It could be useful to add some examples to the README. Here's one I made for the logistic growth model: https://gist.github.com/yoavram/5550c3f5daf1772e8352

mattja commented 8 years ago

You are right, examples in the README would be good. Love the @interact, works very well for demoing stochastic processes. If I can find a way to handle .ipynb files under version control then we could put some in an examples directory.

I'll add these two examples to the README now: eqn1 eqn2

I won't add the stochastic logistic model for now, as it has the slight complication of an extinction time if N reaches 0. If it crosses N=0, the diffusion is undefined after that and the integration then produces NaN values which generate warning messages in the notebook.

yoavram commented 8 years ago

.ipynb work in version control - they are just json files, and github renders them automatically. you can diff them using nbconvert by converting them to md files, if you want.

I see your point about extinction, it can be avoided by choosing N(0) high enough, but it doesn't really matter to me, as long as there are some examples :+1:

yoavram commented 8 years ago

@mattja can you give one sentence for each example describing where these equations arise in science?