probinet.synthetic.anomaly#
Class for generation and management of synthetic networks with anomalies
Classes
|
Class for generation and management of synthetic networks with anomalies. |
- class probinet.synthetic.anomaly.SyntNetAnomaly(m: int = 1, N: int = 100, K: int = 2, avg_degree: float = 4.0, rho_anomaly: float = 0.1, structure: str = 'assortative', label: str | None = None, pi: float = 0.8, eta: float = 0.5, L1: bool = False, ag: float = 0.6, bg: float = 1.0, corr: float = 0.0, over: float = 0.0, verbose: int = 0, out_folder: Path = PosixPath('outputs'), output_parameters: bool = False, output_adj: bool = False, outfile_adj: str | None = None, rng: Generator | None = None)[source]#
Class for generation and management of synthetic networks with anomalies.
- anomaly_network_PB(parameters=None)[source]#
Generate a directed, possibly weighted network by using the anomaly models Poisson-Poisson.
- Steps:
Generate or load the latent variables Z_ij.
Extract A_ij entries (network edges) from a Poisson (M_ij) distribution if Z_ij=0; from a Poisson (pi) distribution if Z_ij=1.
- Parameters:
parameters – Latent variables z, s, u, v, and w.
- Returns:
G – DiGraph NetworkX object. Self-loops allowed.
- Return type:
DiGraph