EoN.estimate_directed_SIR_prob_size¶
- EoN.estimate_directed_SIR_prob_size(G, tau, gamma, *, rng=None)[source]¶
Predicts probability and attack rate assuming continuous-time Markovian SIR disease on network G
From figure 6.17 of Kiss, Miller, & Simon. Please cite the book if using this algorithm
- See Also:
estimate_nonMarkov_SIR_prob_sizewhich handles nonMarkovian versions- Arguments:
- G networkx Graph
The network the disease will transmit through.
- tau positive float
transmission rate
- gamma positive float
recovery rate
- rng random number generator
If None, will be set to np.random.default_rng()
- Returns:
- PE, AR numbers (between 0 and 1)
Estimates of epidemic probability and attack rate found by performing directed percolation, finding largest strongly connected component and finding its in/out components.
- SAMPLE USE:
import networkx as nx import EoN G = nx.fast_gnp_random_graph(1000,0.003) PE, AR = EoN.estimate_directed_SIR_prob_size(G, 2, 1)