samedi 29 avril 2017

Geometric distribution values in Forest Fire generation model

I am trying to do implementation (Python) of the Forest Fire graph generation algorithm (http://ift.tt/2qkIwR9).
Here is how pseudo-code looks like: pseudo-code of FF model
The problem I am having with is understanding the second step. How to generate these numbers?

There is an implementation in numpy library http://ift.tt/2qkRTR2 but it requires not just p value but also size (size of what in case of this algorithm? why in the algorithms are given geometric means, why not just p value?)

I found one solution here http://ift.tt/2piA0DU but I am not sure it works right (according to the needs of this algorithm)

Any suggestions? Thank you all very much in advance!

Guys from @igraph, I also tagged you as you have implementation of FF. Maybe you could help.




Aucun commentaire:

Enregistrer un commentaire