API

API#

probinet.evaluation

Output Module

probinet.evaluation.community_detection

Functions for evaluating community detection.

probinet.evaluation.covariate_prediction

Module for extracting true labels and predicting labels.

probinet.evaluation.expectation_computation

Functions for computing expectations and related metrics.

probinet.evaluation.likelihood

This module provides functions for computing the log-likelihood and pseudo log-likelihood of the models, as well as other related calculations.

probinet.evaluation.link_prediction

Functions for evaluating link prediction.

probinet.input

Input Module

probinet.input.loader

Functions for handling the data.

probinet.input.preprocessing

It provides functions for preprocessing and constructing adjacency tensors from NetworkX graphs.

probinet.input.stats

It is designed to compute and print statistical information about NetworkX graphs.

probinet.main

Main script to run the algorithms.

probinet.model_selection

Model Selection Module

probinet.model_selection.acd_cross_validation

This module contains the ACDCrossValidation class, which is used to perform cross-validation of the ACD algorithm.

probinet.model_selection.crep_cross_validation

This module contains the CRepCrossValidation class, which is used for cross-validation of the CRep algorithm.

probinet.model_selection.cross_validation

Main function to implement cross-validation given a number of communities.

probinet.model_selection.dyncrep_cross_validation

This module contains the DynCRepCrossValidation class, which is used for cross-validation of the DynCRep algorithm.

probinet.model_selection.jointcrep_cross_validation

This module contains the JointCRepCrossValidation class, which is used for cross-validation of the JointCRep algorithm.

probinet.model_selection.main

Main module for running cross-validation for different algorithms.

probinet.model_selection.masking

This module provides functions for shuffling indices and extracting masks for selecting the held-out set in the adjacency tensor and design matrix.

probinet.model_selection.mtcov_cross_validation

This module contains the MTCOVCrossValidation class, which is used for cross-validation of the MTCOV algorithm.

probinet.model_selection.parameter_search

This module defines the grid of parameters to be tested for models selection.

probinet.models

Model Module

probinet.models.acd

Class definition of ACD, the algorithm to perform inference in networks with anomaly.

probinet.models.base

Base classes for the models classes.

probinet.models.classes

This module contains the definition of namedtuple classes.

probinet.models.constants

This file contains the constants used in the models.

probinet.models.crep

Class definition of CRep, the algorithm to perform inference in networks with reciprocity.

probinet.models.dyncrep

Class definition of DynCRep, the algorithm to perform inference in temporal networks [SCDB22].

probinet.models.jointcrep

Class definition of JointCRep, the algorithm to perform inference in networks with reciprocity.

probinet.models.mtcov

Class definition of MTCOV, the generative algorithm that incorporates both the topology of interactions and node attributes to extract overlapping communities in directed and undirected multilayer networks [CPDB20].

probinet.synthetic

Synthetic Module

probinet.synthetic.anomaly

Class for generation and management of synthetic networks with anomalies

probinet.synthetic.base

Base classes for synthetic network generation.

probinet.synthetic.dynamic

Class definition of the reciprocity generative models with the member functions required.

probinet.synthetic.multilayer

Code to generate multilayer networks with non-negative and discrete weights, and whose nodes are associated with one categorical attribute.

probinet.synthetic.reciprocity

Class definition of the reciprocity generative models with the member functions required.

probinet.utils

Utils Module

probinet.utils.matrix_operations

This module contains functions that perform matrix operations, such as the Khatri-Rao product.

probinet.utils.tools

This module contains utility functions for data manipulation and file I/O.

probinet.version

Version file.

probinet.visualization

Visualization Module

probinet.visualization.plot

It provides a set of plotting functions for visualizing the results of the generative models.