LISN#

cosasi.source_inference.single_source.lisn.distance_prob(t, n, infection_rate=0.1)#

Approximates the probability of one node receiving the rumor/contagion from another node n edges away within time t.

Parameters
  • t (int (optional)) – the observation timestep corresponding to I This is not actually used, but exists to match the format of other algorithms

  • n (int) – shortest path distance

  • infection_rate (float (optional)) – Inter-node infection efficiency from the original contagion process must be in [0, 1]

Notes

This function is defined in Section 3 of [1].

References

1

G. Nie and C. Quinn, “Localizing the Information Source in a Network” TrueFact 2019: KDD 2019 Workshop on Truth Discovery and Fact Checking: Theory and Practice, 2019

cosasi.source_inference.single_source.lisn.lisn(I, G, t=None, infection_rate=0.1)#

Implements the algorithm from Localizing the Information Source in a Network to score all nodes in G [1].

Parameters
  • I (NetworkX Graph) – The infection subgraph observed at a particular time step

  • G (NetworkX Graph) – The original graph the infection process was run on. I is a subgraph of G induced by infected vertices at observation time.

  • t (int (optional)) – the observation timestep corresponding to I

  • infection_rate (float (optional)) – Inter-node infection efficiency from the original contagion process must be in [0, 1]

Notes

Because the probabilities can be quite small, we report the log-score, rather than the raw score itself.

To our knowledge, this algorithm has no official name; it is referred to as “Algorithm 1” in its corresponding publication [1]. We dub it LISN, the acronym of the publication title (Localizing the Information Source in a Network).

Nodes outside the infection subgraph receive a score of negative infinity.

Examples

>>> result = cosasi.single_source.lisn(I, G)

References

1(1,2)

G. Nie and C. Quinn, “Localizing the Information Source in a Network” TrueFact 2019: KDD 2019 Workshop on Truth Discovery and Fact Checking: Theory and Practice, 2019