jangevaare / ilmpythontools Goto Github PK
View Code? Open in Web Editor NEWTools to simulate and perform inference of individual level infectious disease transmission models in python
Tools to simulate and perform inference of individual level infectious disease transmission models in python
Properly organize modules into a package..
Find what's causing this...
edb1 = infect(pop, 20, 1, edb1, 2)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-29-f20974850e7a> in <module>()
----> 1 edb1 = infect(pop, 20, 1, edb1, 2)
<ipython-input-2-4fb6aa0cdbfb> in infect(pop, alpha, beta, event_db, time)
50 infectious = find_infectious(pop, event_db, time)
51 susceptible = find_susceptible(pop, event_db, time)
---> 52 prob = infect_prob(pop, alpha, beta, infectious, susceptible)
53 new_infections = susceptible.index[np.where(prob < np.random.uniform(0, 1, size=prob.size))]
54 return event_db.append(pd.DataFrame({"time":np.repeat(time, new_infections.size),
<ipython-input-2-4fb6aa0cdbfb> in infect_prob(pop, alpha, beta, infectious, susceptible)
44 def infect_prob(pop, alpha, beta, infectious, susceptible):
45 """Determine infection probabilities for each susceptible individual following ILM framework."""
---> 46 return 1-np.exp(np.multiply(-alpha, kappa(pop, beta, infectious, susceptible)))
47
48 def infect(pop, alpha, beta, event_db, time):
AttributeError: exp
Either utilize matplotlib or pandas for this... animation creation would be useful as well.
Add functionality to plot epidemic curves from any event_db
Finish development of MCMC algorithm for SIR models - applicable to constant and random recovery periods
time per iteration, time remaining, functionality for producing updating trace plots, status bar, etc. would all serve as enhancements.
Currently it is possible to generate new infections at any time. Must alter this to either raise an assertion error (easier), or to rewrite the event database when permission is granted (more difficult).
Provide full sets of examples for all package functionality in ipython notebooks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.