EoN.SIR_pair_based_pure_IC

EoN.SIR_pair_based_pure_IC(G, tau, gamma, initial_infecteds, initial_recovereds=None, nodelist=None, tmin=0, tmax=100, tcount=1001, transmission_weight=None, recovery_weight=None, return_full_data=False)[source]

Encodes System (3.39) of Kiss, Miller, & Simon, using a “pure initial condition”. Please cite the book if using this algorithm.

uses SIR_pair_based after finding the appropriate initial conditions.

Arguments:

G networkx Graph

tau positive float
transmission rate of disease
gamma number
global recovery rate
initial_infecteds list or set
the set of nodes initially infected
initial_recovereds list or set (default None)
the set of nodes that are already recovered.
nodelist list
list of nodes in G in a prescribed order (just since there is no guarantee that G returns nodes in the same order if things change a bit.)
tmin number (default 0)
minimum report time
tmax number (default 100)
maximum report time
tcount integer (default 1001)
number of reports
transmission_weight string
the label for a weight given to the edges. G.edge[i][j][transmission_weight] = g_{ij}
recovery_weight string (default None)

a label for a weight given to the nodes to scale their recovery rates

gamma_i = G.nodes[i][recovery_weight]*gamma
return_full_data boolean (default False)
if True:
returns times, S, I, R, Xs, Ys, Zs, XY, XX
if False:
returns times, S, I, R
Returns:
if return_full_data is True:
returns times, S, I, R, Xs, Ys, Zs, XY, XX
if … is False:
returns times, S, I, R