EoN.estimate_SIR_prob_size(G, p)[source]

Uses percolation to estimate the probability and size of epidemics assuming constant transmission probability p

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

Provies an estimate of epidemic probability and size assuming a fixed transmission probability p.

The estimate is found by performing bond percolation and then finding the largest connected component in the remaining network.

This assumes that there is a single giant component above threshold.

It will not be an appropriate measure if the network is made up of several densely connected components with very weak connections between these components.

G networkx Graph
The network the disease will transmit through.
p number
transmission probability
PE, AR both floats between 0 and 1
estimates of the probability and proportion infected (attack rate) in epidemics (the two are equal, but each given for consistency with estimate_directed_SIR_prob_size)
import networkx as nx
import EoN

G = nx.fast_gnp_random_graph(1000,0.002)
PE, AR = EoN.estimate_SIR_prob_size(G, 0.6)