EoN.estimate_SIR_prob_size_from_dir_perc

EoN.estimate_SIR_prob_size_from_dir_perc(H)[source]

Estimates probability and size of SIR epidemics for an input network after directed percolation

From figure 6.17 of Kiss, Miller, & Simon. Please cite the book if using this algorithm

Arguments:

H directed graph

The outcome of directed percolation on the contact network G

Returns:

PE, AR numbers

Estimates of epidemic probability and attack rate found by finding largest strongly connected component and finding in/out components.

SAMPLE USE:

import networkx as nx
import EoN

G = nx.fast_gnp_random_graph(1000,0.003)
H = some_user_defined_operation_to_do_percolation(G, argument)
PE, AR = EoN.estimate_SIR_prob_size_from_dir_perc(H)