ProbINet
Welcome to the documentation for the Probabilistic Inference on Networks (ProbINet) Python
package. This project is a collaborative effort to consolidate state-of-the-art probabilistic generative modeling implementations from various
scientific publications. Our focus lies in advancing network analysis techniques with an emphasis on recent modeling
approaches that relax the restrictive conditional independence assumption, enabling the modeling of joint
distributions of network data.
The ProbINet package is designed to be a comprehensive and user-friendly toolset for
researchers and practitioners interested in modeling network data through probabilistic
generative approaches. Our goal is to provide a unified resource that brings together different advances scattered across many code repositories.
By doing so, we aim not only to enhance the usability of existing models, but also to facilitate the comparison
of different approaches. Moreover, through a range of tutorials, we aim at simplifying the use of these methods
to perform inferential tasks, including the prediction of missing network edges, node clustering (community detection),
anomaly identification, and the generation of synthetic data from latent variables.
Models Overview
The package integrates a wide range of probabilistic generative models tailored for various network data types and analytical goals. The following
table summarizes the models currently implemented in ProbINet:
| Name | Description | Network Properties |
|---|---|---|
| CRep | Models directed networks with communities and reciprocity [CSDB22]. | Directed, Weighted, Communities, Reciprocity |
| JointCRep | Captures community structure and reciprocity with a joint edge distribution [SCDB21]. | Directed, Communities, Reciprocity |
| DynCRep | Extends CRep for dynamic networks [SCDB22]. | Directed, Weighted, Dynamic, Communities, Reciprocity |
| ACD | Identifies anomalous edges and node community memberships in weighted networks [SDB22]. | Directed, Weighted, Communities, Anomalies |
| MTCOV | Extracts overlapping communities in multilayer networks using topology and node attributes [CPDB20]. | Weighted, Multilayer, Attributes, Communities |
For more details on each model, please refer to the documentation. References to the original papers can be found here.
Installation
This package requires Python 3.10 or higher. Please ensure you have one of these versions before proceeding with the installation. To get started, follow these steps:
- Clone the repository and navigate to the
probinetdirectory:
git clone https://github.com/MPI-IS/probinet.git
cd probinet
- Create a virtual environment. For example, using
venv:
python3 -m venv --copies venv
. venv/bin/activate
(venv) pip install -U pip # optional but always advised!
- Install the
ProbINetpackage by running:
(venv) pip install probinet
Usage
Run the ProbINet package as a whole with the run_probinet command. This command can be run
from any directory after the package is installed.
A list of the parameters that can be passed as arguments is available by running:
run_probinet --help
To run a specific model, pass the model name as an argument. The available models are: CRep, JointCRep, MTCOV, DynCRep, and ACD. For example, to run the CRep model, use:
run_probinet CRep
To see the specific options for a model, use the -h flag. For example, to see the options for the CRep model, use:
run_probinet CRep -h
The run_probinet command can be run at different logging levels. To run the command with the DEBUG level, use:
run_probinet CRep -d
To set arguments with double dashes (e.g., --convergence_tol), include them in the command line
as follows:
run_probinet CRep --convergence_tol 0.1
Some commands can also be executed using shorter versions of the arguments. For example, the
--convergence_tol argument can be shortened to -tol:
run_probinet CRep -tol 0.1
These shorter versions can be found in the help message of each model.
Tests
To run the tests:
python -m unittest
Documentation
The documentation can be built locally. First, install the dev extra:
pip install ".[dev]"
To build the documentation, run:
cd docs
make html
The documentation will be available in the docs/build/html directory.
Tutorials
The tutorials are available in the tutorials directory. Each tutorial is a Jupyter notebook that can be run in a Jupyter environment.
Where to start
If you are new to this type of modeling, we suggest checking out the Inputs and Outputs section. This section provides an overview of the input and output data structures used in the package.
Authors
The authors of the original implementations integrated to this package are:
See the references in the documentation for more details.
Special thanks to Alejandro Posada for his contributions to the logo design. A sincere thank you to Valkyrie Felso and Kathy Su for their invaluable feedback. We also deeply appreciate Kibidi Neocosmos for serving as a beta user and helping refine the package.
Contributing
Would you like to contribute to the development of ProbINet? Contributions are welcome and appreciated! You can find detailed information on how to get started here: Contributing Guide.
License
This project is licensed under the GNU GPL version 3 - see the LICENSE file for details.
Copyright
© 2024, Max Planck Society / Software Workshop - Max Planck Institute for Intelligent Systems
Metadata
Release files for probinet 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| probinet-1.1.tar.gz | 5.5 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| probinet-1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.7 MB
Release files / probinet-1.1.tar.gz
| Download URL | probinet-1.1.tar.gz |
|---|---|
| Size | 5.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba675764c8596c3232294f21647944330aa0a3d32f8ac756ffcb80a550b2e970
|
|
BLAKE2b-256 checksum How to use checksums |
e0993361de448eec116425feac7012df9fa076c685046235e4af84adaec19ce9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / probinet-1.1-py3-none-any.whl
| Download URL | probinet-1.1-py3-none-any.whl |
|---|---|
| Size | 199.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
650d1bf5f7df435bfceb919c508df484e7f4715138ba820d1712fab0ba4c5ddc
|
|
BLAKE2b-256 checksum How to use checksums |
cbe08896775643231aa5a7d230f4b06a17e0c8dccef5365c300d14c372533508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Security for probinet 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.