cosasi

cosasi: Graph Diffusion Source Inference in Python - Published in JOSS (2022)

https://github.com/lmiconsulting/cosasi

Science Score: 93.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
    Found .zenodo.json file
  • DOI references
    Found 9 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords

cyber disease-simulation epidemics graph-algorithms graph-theory message-passing network-analysis network-science python

Scientific Fields

Mathematics Computer Science - 84% confidence
Last synced: 4 months ago · JSON representation

Repository

COntagion Simulation And Source Identification: a Python package for graph diffusion source inference

Basic Info
Statistics
  • Stars: 6
  • Watchers: 2
  • Forks: 4
  • Open Issues: 0
  • Releases: 2
Topics
cyber disease-simulation epidemics graph-algorithms graph-theory message-passing network-analysis network-science python
Created over 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Zenodo

README.md

PyPI version Documentation Status Code style: black Downloads DOI JOSS MIT license

cosasi: Graph Diffusion Source Inference in Python

cosasi (COntagion Simulation And Source Identification) is a Python package for graph diffusion source inference, allowing users to:

  • perform and evaluate source inference using standard techniques from literature,
  • contribute innovative localization methods to a growing core library, and
  • benchmark new techniques against a battery of comparable schemes.

logo

Table of Contents

Installation

Installation via PyPI

bash pip install cosasi

Installation via GitHub

Clone the repo from here (this repo).

Install requirements: bash pip install -r requirements.txt

Getting Started

Once cosasi is installed, feel free to review our tutorial introducing major functionality. Official documentation, including a detailed API reference, is available on Read the Docs.

Code Snippet

| carbon | |:--:| | Above: Carbon image of example code snippet; copy-and-paste-able version below. |

```python import networkx as nx import cosasi

G = nx.fastgnprandomgraph(100, 0.25) contagion = cosasi.StaticNetworkContagion( G=G, model="si", infectionrate=0.01, numberinfected=3, ) contagion.forward(100) I = contagion.getinfectedsubgraph(step=15) result = cosasi.sourceinference.multiplesource.netsleuth(G=G, I=I) result.evaluate(contagion.getsource()) ```

Testing

Extensive unit testing is employed throughout, with ~97% code coverage.

If you've cloned our repo from GitHub, you can cd into the root directory and run pytest via coverage:

bash coverage run -m pytest

To read the .coverage file:

bash coverage report

Contributions

We’d love your help! If you’d like to make an addition or improvement, please submit a pull request consisting of an atomic commit and a brief message describing your contribution.

Our contributor guide is here, and we itemize a few areas of development we’d like to prioritize for the future of cosasi here. If you find something wrong, please submit a bug report to the issue tracker. For other questions or comments, feel free to contact us directly.

Citing

If you found cosasi helpful in your work, please consider citing it with:

bibtex @article{McCabe2022joss, doi = {10.21105/joss.04894}, url = {https://doi.org/10.21105/joss.04894}, year = {2022}, publisher = {The Open Journal}, volume = {7}, number = {80}, pages = {4894}, author = {Lucas H. McCabe}, title = {cosasi: Graph Diffusion Source Inference in Python}, journal = {Journal of Open Source Software} }

McCabe, L. H., (2022). cosasi: Graph Diffusion Source Inference in Python. Journal of Open Source Software, 7(80), 4894, https://doi.org/10.21105/joss.04894

Support

cosasi was developed in Forge, the technology accelerator of the Logistics Management Institute.

Contact

Questions? Reach out: - Lucas (email)

License

MIT

Owner

  • Name: LMI
  • Login: lmiconsulting
  • Kind: organization
  • Location: Tysons, VA

LMI is a consultancy dedicated to powering a future-ready, high-performing government.

JOSS Publication

cosasi: Graph Diffusion Source Inference in Python
Published
December 13, 2022
Volume 7, Issue 80, Page 4894
Authors
Lucas H. McCabe ORCID
Digital and Analytic Solutions, Logistics Management Institute, Department of Mathematics, The George Washington University
Editor
Daniel S. Katz ORCID
Tags
network science graph algorithms network analysis epidemics simulation communication information theory

GitHub Events

Total
Last Year

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 24
  • Total Committers: 1
  • Avg Commits per committer: 24.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Lucas l****e@g****m 24

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 2
  • Total pull requests: 3
  • Average time to close issues: 3 days
  • Average time to close pull requests: 7 minutes
  • Total issue authors: 2
  • Total pull request authors: 1
  • Average comments per issue: 11.5
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • 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
  • sara-02 (1)
Pull Request Authors
  • danielskatz (3)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 47 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
pypi.org: cosasi

COntagion Simulation And Source Identification

  • Versions: 4
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 47 Last month
Rankings
Dependent packages count: 6.6%
Forks count: 23.2%
Average: 27.3%
Stargazers count: 28.2%
Dependent repos count: 30.6%
Downloads: 48.1%
Maintainers (1)
Last synced: 4 months ago

Dependencies

requirements.txt pypi
  • coverage ==6.3.2
  • ndlib ==5.1.1
  • networkx ==2.8.4
  • numpy ==1.20.1
  • pytest ==7.1.1
  • scikit_learn ==1.1.2
  • scipy ==1.9.0
  • six ==1.16.0
docs/requirements.txt pypi
  • coverage ==6.3.2
  • ndlib ==5.1.1
  • networkx ==2.8.7
  • numpy ==1.21.4
  • numpydoc *
  • pydata_sphinx_theme ==0.8.1
  • pytest ==7.1.1
  • scikit_learn ==1.1.2
  • scipy ==1.9.3
  • six ==1.16.0
  • sphinx-press-theme *
  • sphinx_automodapi ==0.12
setup.py pypi