Package for simulating influence in networks
from influence_simulator import IndependentCascadeSimulator
from influence_simulator.utils import load_graph
graph = load_graph("Facebook.gml")
simulator = IndependentCascadeSimulator(
graph,
infection_probability=0.1,
random_state=2042,
)
simulator.simulate()
simulator.save_result("out.csv")
influence-simulator \
Facebook.gml \
model_config.json \
--output ./simulation_results/ \
--n-jobs 6 \
--chunksize 10 \
--verbose
{
"type": "IndependentCascadeSimulator",
"infection_probability": 0.1,
"random_state": 2042
}
pip install "influence-simulator[internal] @ git+https://github.com/network-science-lab/influence-simulator"