EoN.SIR_compact_effective_degree_from_graph

EoN.SIR_compact_effective_degree_from_graph(G, tau, gamma, initial_infecteds=None, initial_recovereds=None, rho=None, tmin=0, tmax=100, tcount=1001, return_full_data=False)[source]

Calls SIR_compact_effective_degree after calculating Skappa0, I0, R0, SI0 from the graph G and initial fraction infected rho. :Arguments:

G networkx Graph
The contact network
tau positive float
transmission rate
gamma number
recovery rate
initial infecteds node or iterable of nodes (default None)
if a single node, then this node is initially infected if an iterable, then whole set is initially infected if None, then choose randomly based on rho. If rho is also None, a random single node is chosen. If both initial_infecteds and rho are assigned, then there is an error.
initial_recovereds iterable of nodes (default None)
this whole collection is made recovered. Currently there is no test for consistency with initial_infecteds. Understood that everyone who isn’t infected or recovered initially is initially susceptible.
rho float between 0 and 1 (default None)
the fraction to be randomly infected at time 0 If None, then rho=1/N is used where N = G.order()
tmin number (default 0)
minimum report time
tmax number (default 100)
maximum report time
tcount integer (default 1001)
number of reports
return_full_data boolean
tells whether to just return times, S, I, R or all calculated data.
Returns:
if return_full_data==False

times np.array of times

S np.array of number susceptible

I np.array of number infected

R np.array of number recovered

else

times as before

S number susceptible

I number infected

R number recovered

SI S_{s,i}
number of SI edges