EoN.EBCM_discrete

EoN.EBCM_discrete(N, psihat, psihatPrime, p, phiS0, phiR0=0, R0=0, tmin=0, tmax=100, return_full_data=False)[source]

Encodes system (6.11) of Kiss, Miller, & Simon. Please cite the book if using this algorithm.

theta(t) = (1-p) + p(phi_R(0)
  • phi_S(0) psihatPrime(theta(t-1))/psihatPrime(1))

R(t) = R(t-1) + I(t-1) S(t) = N psihat(theta(t)) I(t) = N-S-R

Arguments:

N positive integer

size of population

psihat function

psihat(x) = \sum_k S(k,0) x^k

psihatPrime function

psihatPrime(x) = d psihat(x)/dx = sum_k k S(k,0) x^{k-1}

p number

per edge transmission probability

phiS0 number

initial proportion of edges (of susceptible nodes) connecting to susceptible nodes

phiR0 number

initial proportion of edges (of susceptible nodes) connecting to recovered nodes

R0 number

number of recovered nodes at time 0

tmax number

maximum time

return_full_data boolean
if False,

return t, S, I, R

if True

return t, S, I, R, and theta

Returns:

if return_full_data == False:

returns t, S, I, R, all numpy arrays

if …== True

returns t, S, I, R and theta, all numpy arrays