Skip to main content

Gibbs Sampler and other functions for PAPER (Preferential Attachment Plus Erdos--Renyi) model for random networks

Project description

PAPER

Implementation of Gibbs sampler for computing posterior root probabilities under the PAPER (preferential attachment plus Erdos--Renyi) model for random networks.

See details in the arXiv paper: https://arxiv.org/abs/2107.00153

Documentation

Installation

$ pip install PAPER

Usage

>>> from PAPER.gibbsSampling import gibbsToConv
>>> from PAPER.tree_tools import createNoisyGraph
>>> graf = createNoisyGraph(n=100, m=200, alpha=0, beta=1, K=1)[0]
>>> mcmc_out = gibbsSampling.gibbsToConv(graf, DP=False, method="full",
                   K=1, tol=0.1)

See example.py for interpreting the inference output. Some sample network datasets are provided.

Notes

  • No preprocessing required on input graph. If the input graph is disconnected, the largest connected component is used.
  • The algorithm performs roughly 1 outer Gibbs iteration in 1 second on a graph with 10,000 edges. The number of iterations to convergence depends on the input graph.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paper-network-0.0.1.tar.gz (66.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paper_network-0.0.1-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file paper-network-0.0.1.tar.gz.

File metadata

  • Download URL: paper-network-0.0.1.tar.gz
  • Upload date:
  • Size: 66.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for paper-network-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3735c9a2dfa2149ae28100be78a7e5f007539b6fbd3e33910d06d4e9ccdf9003
MD5 7607bf01e6061a027f3198c399373450
BLAKE2b-256 5e8347d59ceeaabdfffbbc961a4878561638200f5a23ca8e90c5d7960bea95e2

See more details on using hashes here.

File details

Details for the file paper_network-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: paper_network-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for paper_network-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5bc0627faa2b97336bff91395792240d3cfb49eceb34a78ee3cd1f0e347bead
MD5 fe159c920ced02abf74eca8518ccd3d2
BLAKE2b-256 e9c8dc99f02eb73ece49ebef0421a0b24ccf56ac4f36120608ae609a3bab3520

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page