https://github.com/benmaier/dyngillepi
Runs Gillespie contagion processes on time dependent contact networks.
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: plos.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (5.8%) to scientific vocabulary
Repository
Runs Gillespie contagion processes on time dependent contact networks.
Basic Info
- Host: GitHub
- Owner: benmaier
- License: mit
- Language: C++
- Default Branch: master
- Size: 23.4 KB
Statistics
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 2
- Releases: 0
Metadata Files
README.md
DynGillEpi
Python wrapper for the Gillespie contagion functions developed and written by CL Vestergaard and M Génois in Temporal Gillespie Algorithm: Fast Simulation of Contagion Processes on Time-Varying Networks. Check out the original source code at https://github.com/CLVestergaard/TemporalGillespieAlgorithm.
Note that I changed the source code in the way that all random number generators are now taken from the C++ standard library.
Install
Python
$ sudo pip install ./DynGillEpi
Examples
sandbox
$ cd sandbox
$ python SIS.py
SIS.py
```python import numpy as np import matplotlib.pyplot as pl import networkx as nx import DynGillEpi
SIS = DynGillEpi.SISPoissonhomogeneous
Nnodes = 10 nslices = 10 contactlist = [ [tuple(e) for e in nx.fastgnprandomgraph(Nnodes,2./(Nnodes-1.)).edges()] for i in range(n_slices) ]
nsimulations = 100 Tsimulation = 100
infectionrate = 10. # number of events per SI-link per dt recoveryrate = 1. # number of recoveries per infected per dt
result = SIS(Nnodes, contactlist, infectionrate, recoveryrate, Tsimulation, numberofsimulations = nsimulations, initialnumberof_infected = 3, seed = 324345, verbose = False, )
allI = np.array(result.I,dtype=float) allSI = np.array(result.SI,dtype=float)
obs = [allI, allSI] t = np.arange(T_simulation)
for o in obs: mean = o.mean(axis=0) std = o.std(axis=0) / np.sqrt(n_simulations - 1.) pl.errorbar(t,mean,std)
pl.xlabel(r'time $t/\Delta t$') pl.ylabel(r'total number') pl.legend(['of infected', 'of SI-links']) pl.show()
```
Owner
- Name: Benjamin F. Maier
- Login: benmaier
- Kind: user
- Location: Copenhagen
- Company: Technical University of Denmark
- Website: benmaier.org
- Twitter: benfmaier
- Repositories: 101
- Profile: https://github.com/benmaier
Postdoc @suneman 's, generative art, electronic music. DTU Compute & SODAS.
GitHub Events
Total
Last Year
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Benjamin Maier | b****r@g****m | 12 |
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 2
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- benmaier (2)