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
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3735c9a2dfa2149ae28100be78a7e5f007539b6fbd3e33910d06d4e9ccdf9003
|
|
| MD5 |
7607bf01e6061a027f3198c399373450
|
|
| BLAKE2b-256 |
5e8347d59ceeaabdfffbbc961a4878561638200f5a23ca8e90c5d7960bea95e2
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5bc0627faa2b97336bff91395792240d3cfb49eceb34a78ee3cd1f0e347bead
|
|
| MD5 |
fe159c920ced02abf74eca8518ccd3d2
|
|
| BLAKE2b-256 |
e9c8dc99f02eb73ece49ebef0421a0b24ccf56ac4f36120608ae609a3bab3520
|