-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Probability Based on Number of Neighbors #171
Comments
Hi, basically, you would like to have (instead of a fixed probability threshold) a step function that computes a node-wise probability threshold considering the specificity of each node’s surroundings. The easiest way to do that is to write a new model from scratch extending the DiffusionModel partial class. It is not difficult, we have a small tutorial in the docs. In brief, you have to reimplement the iteration method and specify the expected input parameters. |
@GiulioRossetti Perfect, thank you very much! |
@TheAkashain how is different what you are saying from what is now implemented ? ndlib/ndlib/models/epidemics/SIRModel.py Line 87 in 339fe0f
(it was a change I suggested) (this was the commit bb2d264) |
@ggrrll he was asking for something different, a more general setting (if I got it right). Assume for instance that you don't want to have independent dice rolling for each infected neighbour but instead, an apriori, group-wise, defined beta (e.g., 1 infected neighbours beta=0.1, two beta=0.5, three beta=0.12...). |
ok |
@ggrrll In particular, I was looking for the (infected_neighbors) piece to include multiple different compartments with equal likelihood of causing an infection. Thus, let's say we are testing symptomatic and asymptomatic cases, where both infect with a rate of beta, then I want the code to be:
I didn't actually realize we could design our own models extending the DiffusionModel partial class before posting this, hence that I now have working code for it! |
yeah... I think we are all working on the same thing these days 😅... anyways... so, you could even think indeed, of a different inf. prob. for sym/asy, so that the prob.
|
@ggrrll I'll make note of this one, that definitely would be a good solution for different 𝛽 values depending on compartment. Right now I am using an SLLAIAIR model with L = latent infection (exposed), A = asymp, I = symp, where I has an infection chance of 0. I'm not really sure what advantage such a model would have over a simple SE(AI)R model, but oh well. |
@TheAkashain @ggrrll guys, remember that if you like we can even plan an inclusion of your models within the next release. Just saying. |
@GiulioRossetti When I get it fully working, I will happily send it in with examples and results! |
@GiulioRossetti @TheAkashain thanks guys :) – never felt so useful since in academia 😂 |
Guess who is back with a new idea?
For my current project, my team is inquiring into developing a disease where the probability (or rate) of becoming infected depends on the number of infected neighbors more explicably. As it stands, I know the probability of infection is a test where a node will run a check of the probability of infection for each sick neighbor (so 2 sick neighbors means 2 rolls of the die), but this one is a little different.
For example, let's say we define the probability on a static value (beta), the number of susceptible neighbors (S) and the number of infected neighbors (I). So the transition of S -> I depends on probability = (betaSI). How would this be possible, seeing as it's a unique way of checking?
The text was updated successfully, but these errors were encountered: