EoN.Attack_rate_discrete

EoN.Attack_rate_discrete(Pk, p, rho=None, Sk0=None, phiS0=None, phiR0=0, number_its=100)[source]

Encodes systems (6.6) and (6.10) of Kiss, Miller, & Simon. Please cite the book if using this algorithm.

To use system (6.6), leave rho and Sk0 as None.

Arguments:

Pk dict

Pk[k] is the probability a randomly selected node has degree k.

tau positive float

per-edge transmission rate.

gamma number

per-node recovery rate

number_its int The solution is found iteratively, so this determines

the number of iterations.

rho Number (default None)

proportion of the population to be randomly infected at time 0 only one of rho and Sk0 can be defined. The other (or both) should remain None. if rho=0, then calculates the limiting attack rate as rho->0 (assuming an epidemic happens)

Sk0 dict (default None)

only one of rho and Sk0 can be defined. The other (or both) should remain None. Sk0 is a dict such that Sk0[k] is the probability that a degree k node is susceptible at start.

phiS0 number (default None)

Should only be used if Sk0 is not None. If it is None, then assumes that initial introduction is randomly introduced

phiR0 number (default 0)

As with phiS0, only used if Sk0 is not None.

Returns:

AR float

the predicted fraction infected.