fccoelho / fccoelho/bayesian-inference
Parameter names and values as a dictionnary in gillespie method
- Dominant language
- HTML
- Stars
- 6
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
```
This is just an idea: couldn't the gillespie function use a dictionnary instead
of a list of values?
This would allow the transition functions to be more readable (and avoid wrong
results from switching two indexes by accident):
'''
rates = [.001,.1]
prop=[lambda r, ini:r[0]*ini[0]*ini[1],lambda r,ini:r[0]*ini[1]]
'''
(as a side matter, I think one of those r[] should be one, so that people
recover - see line 117 of gillespie.py)
Would become
'''
rates = {'inf':.001, 'rec':.1}
#prop=[lambda r, ini:r['inf']*ini[0]*ini[1],lambda r,ini:r['rec']*ini[1]]
'''
```
Original issue reported on code.google.com by `rany...@gmail.com` on 22 Nov 2010 at 6:21
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.