Expand description
Information diffusion models
Provides four simulation models on an adjacency representation:
| Model | Description |
|---|---|
IndependentCascade | Each active node activates each inactive neighbour with probability p(u,v) |
LinearThreshold | Node activates when total in-weight from active neighbours ≥ per-node threshold |
SIRModel | Epidemic SIR: β infection probability per edge, γ recovery probability per step |
SISModel | Epidemic SIS: β/γ as SIR but recovered nodes return to susceptible |
Structs§
- Independent
Cascade - Independent Cascade (IC) diffusion model configuration.
- Linear
Threshold - Linear Threshold (LT) diffusion model configuration.
- SIRModel
- SIR epidemic model (Susceptible–Infected–Recovered).
- SISModel
- SIS epidemic model (Susceptible–Infected–Susceptible).
- Simulation
Result - Outcome of a single diffusion simulation.
Enums§
- SirState
- State of a node in the SIR / SIS epidemic model.
Functions§
- expected_
spread - Estimate the expected spread of a seed set under the IC model using
Monte-Carlo averaging over
num_simulationsindependent runs. - simulate_
ic - Simulate one run of the Independent Cascade model.
- simulate_
lt - Simulate one run of the Linear Threshold model.
- simulate_
sir - Simulate one run of the SIR epidemic model.
- simulate_
sis - Simulate one run of the SIS epidemic model.
Type Aliases§
- AdjList
- Compact edge representation: (target_id, edge_weight).