Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/composite' into composite
Browse files Browse the repository at this point in the history
  • Loading branch information
GiulioRossetti committed Jan 25, 2018
2 parents f301539 + 9fd81e4 commit c8823b1
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
6 changes: 3 additions & 3 deletions docs/reference/models/dynamics/dSI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The model is instantiated on a graph having a non-empty set of infected nodes.

SI assumes that if, during a generic iteration, a susceptible node comes into contact with an infected one, it becomes infected with probability β: once a node becomes infected, it stays infected (the only transition allowed is S→I).

The dSI implementation assumes that the process occurs on a directed/undirected dynamic network.
The dSI implementation assumes that the process occurs on a directed/undirected dynamic network; this model was introduced by Milli et al. in 2018 [#]_.

--------
Statuses
Expand Down Expand Up @@ -106,5 +106,5 @@ In the code below is shown an example of instantiation and execution of an DynSI
# Simulation interaction graph based execution
iterations = model.execute_iterations()
.. [#] W. O. Kermack and A. McKendrick, “A Contribution to the Mathematical Theory of Epidemics,” Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, vol. 115, no. 772, pp. 700–721, Aug. 1927.
.. [#] W. O. Kermack and A. McKendrick, “A Contribution to the Mathematical Theory of Epidemics,” Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, vol. 115, no. 772, pp. 700–721, Aug. 1927.
.. [#] Letizia Milli, Giulio Rossetti, Fosca Giannotti, Dino Pedreschi. “Diffusive Phenomena in Dynamic Networks: a data-driven study”. Accepted to International Conference on Complex Networks (CompleNet), 2018, Boston.
5 changes: 3 additions & 2 deletions docs/reference/models/dynamics/dSIR.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ The model is instantiated on a graph having a non-empty set of infected nodes.

SIR assumes that if, during a generic iteration, a susceptible node comes into contact with an infected one, it becomes infected with probability beta, than it can be switch to removed with probability gamma (the only transition allowed are S→I→R).

The dSIR implementation assumes that the process occurs on a directed/undirected dynamic network.
The dSIR implementation assumes that the process occurs on a directed/undirected dynamic network; this model was introduced by Milli et al. in 2018 [#]_.

--------
Statuses
Expand Down Expand Up @@ -110,4 +110,5 @@ In the code below is shown an example of instantiation and execution of an DynSI
iterations = model.execute_iterations()
.. [#] W. O. Kermack and A. McKendrick, “A Contribution to the Mathematical Theory of Epidemics,” Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, vol. 115, no. 772, pp. 700–721, Aug. 1927
.. [#] W. O. Kermack and A. McKendrick, “A Contribution to the Mathematical Theory of Epidemics,” Proceedings of the Royal Society of London. Series A, Containing Papers of a Mathematical and Physical Character, vol. 115, no. 772, pp. 700–721, Aug. 1927
.. [#] Letizia Milli, Giulio Rossetti, Fosca Giannotti, Dino Pedreschi. “Diffusive Phenomena in Dynamic Networks: a data-driven study”. Accepted to International Conference on Complex Networks (CompleNet), 2018, Boston.
28 changes: 19 additions & 9 deletions docs/reference/models/epidemics/GeneralisedThreshold.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,21 @@
Generalised Threshold
*********************

The Generalised Threshold model was introduced in 2017 by Török and Kertesz [#]_.

In this model, during an epidemics, a node is allowed to change its status from **Susceptible** to **Infected**.

The model is instantiated on a graph having a non-empty set of infected nodes.

The model is defined as follows:

1. At time *t* nodes become Infected with rate *mu* *t*/*tau*
2. Nodes for which the ratio of the active friends dropped below the threshold are moved to the Infected queue
3. Nodes in the Infected queue become infected with rate *tau*. If this happens check all its friends for threshold

--------
Statuses
--------

During the simulation a node can experience the following statuses:

=========== ====
Expand All @@ -19,15 +30,13 @@ Infected 1
Parameters
----------

========= ===== =============== ======= ========= ========================
========= ===== =============== ======= ========= =======================
Name Type Value Type Default Mandatory Description
========= ===== =============== ======= ========= ========================
threshold Node float in [0, 1] 0.1 False Individual threshold
tau Model int True Adoption threshold rate
mu Model int True Exogenous timescale
========= ===== =============== ======= ========= ========================


========= ===== =============== ======= ========= =======================
threshold Node float in [0, 1] 0.1 False Individual threshold
tau Model int True Adoption threshold rate
mu Model int True Exogenous timescale
========= ===== =============== ======= ========= =======================

The initial infection status can be defined via:

Expand Down Expand Up @@ -100,4 +109,5 @@ In the code below is shown an example of instantiation and execution of a Thresh
# Simulation execution
iterations = model.iteration_bunch(200)
.. [#] János Török and János Kertész “Cascading collapse of online social networks” Scientific reports, vol. 7 no. 1, 2017
4 changes: 4 additions & 0 deletions docs/reference/models/epidemics/Profile.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
*******
Profile
*******
The Profile model was introduced in 2017 by Milli et al. [#]_.


The Profile model assumes that the diffusion process is only apparent; each node decides to adopt or not a given behavior – once known its existence – only on the basis of its own interests.

Expand Down Expand Up @@ -110,3 +112,5 @@ In the code below is shown an example of instantiation and execution of a Profil
# Simulation execution
iterations = model.iteration_bunch(200)
.. [#] Letizia Milli, Giulio Rossetti, Dino Pedreschi, Fosca Giannotti, “Information Diffusion in Complex Networks: The Active/Passive Conundrum,” Proceedings of International Conference on Complex Networks and their Applications, (pp. 305-313). Springer, Cham. 2017
3 changes: 3 additions & 0 deletions docs/reference/models/epidemics/ProfileThreshold.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*****************
Profile Threshold
*****************
The Profile-Threshold model was introduced in 2017 by Milli et al. [#]_.

The Profile-Threshold model assumes the existence of node profiles that act as preferential schemas for individual tastes but relax the constraints imposed by the Profile model by letting nodes influenceable via peer pressure mechanisms.

Expand Down Expand Up @@ -109,3 +110,5 @@ In the code below is shown an example of instantiation and execution of a Profil
# Simulation execution
iterations = model.iteration_bunch(200)
.. [#] Letizia Milli, Giulio Rossetti, Dino Pedreschi, Fosca Giannotti, “Information Diffusion in Complex Networks: The Active/Passive Conundrum,” Proceedings of International Conference on Complex Networks and their Applications, (pp. 305-313). Springer, Cham. 2017
9 changes: 8 additions & 1 deletion docs/reference/models/epidemics/SWIR.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
****
SWIR
****
The SWIR model was introduced in 2017 by Lee et al. [#]_.

In this model, during the epidemics, a node is allowed to change its status from **Susceptible** (S) to **Weakened** (W) or **Infected** (I), then to **Removed** (R).

The model is instantiated on a graph having a non-empty set of infected nodes.

At time *t* a node in the state I is selected randomly and the states of all neighbors are checked one by one. If the state of a neighbor is S then this state changes either i) to I with probability *kappa* or ii) to W with probability *mu*. If the state of a neighbor is W then the state W changes to I with probability *nu*. We repeat the above process for all nodes in state I and then changes to R for each associated node.

--------
Statuses
Expand Down Expand Up @@ -62,7 +68,7 @@ Describe
^^^^^^^^^^^^^^^^^^
Execute Simulation
^^^^^^^^^^^^^^^^^^
.. automethod:: ndlib.models.epidemics.SWIRModel.SWIRModel.iteration(self)
.. automethod:: ndlib.models.epidemics.SWIRModel.SEIRModel.iteration(self)
.. automethod:: ndlib.models.epidemics.SWIRModel.SWIRModel.iteration_bunch(self, bunch_size)


Expand Down Expand Up @@ -96,3 +102,4 @@ In the code below is shown an example of instantiation and execution of an SEIR
iterations = model.iteration_bunch(200)
.. [#] D. Lee, W. Choi, J. Kertész, B. Kahng. “Universal mechanism for hybrid percolation transitions”. Scientific Reports, vol. 7(1), 5723, 2017.

0 comments on commit c8823b1

Please sign in to comment.