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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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