EoN.EBCM_pref_mix_discrete_from_graph¶
-
EoN.
EBCM_pref_mix_discrete_from_graph
(G, p, rho=None, tmin=0, tmax=100, return_full_data=False)[source]¶ Takes a given graph, finds degree correlations, and calls EBCM_pref_mix_discrete
SAMPLE USE: import networkx as nx import EoN import matplotlib.pyplot as plt G = nx.bipartite.configuration_model([5]*300000, [2]*750000) t, S, I, R = EoN.basic_discrete_SIR(G, 0.6, rho = 0.002) tx, Sx, Ix, Rx = EoN.EBCM_pref_mix_discrete_from_graph(G, 0.6, rho=0.002, tmax=t[-1]) plt.plot(t, I, label = 'simulation') plt.plot(tx, Ix, '--', label = 'analytic prediction') plt.legend(loc='upper right') plt.show()