Treffer: Efficient Stochastic Simulation of Epidemics ; Incremental Gillespie Algorithm for Efficient Two-Strain Epidemic Simulation in Python
Weitere Informationen
Here's an efficient implementation of Gillespie's algorithm for SI, SIS, and SIR epidemic models using NetworkX in Python. Features Very efficient implementation of Gillespie's algorithm on large sparse networks using incremental updates and efficient sampling schemes. Integrated with python networkx model. Supports SI, SIS, and SIR epidemic models Works with any NetworkX graph (Adjacency List representation) Uses Gillespie’s Direct Method for stochastic simulations of continuous time markov chain model Includes plots of the epidemic dynamics and examples on standard random network models with 1000 nodes. Makes use of efficient incremental updates and separate infected nodes list to minimize computational time and space complexity, especially when it comes to small infection numbers (early stage of an epidemic) and sparse networks (total number of links grows proportionally with the number of nodes). Light weight implementation under GNU CC4.0 license Update: small error on the weight updates in previous version was removed. graphical output visualizes now the infection rates of infected notes using size of nodes. added two strain dynamics as additional file.