Open Question: Simple or maybe not so simple probabilistic question?
I'm working on a little neural network for the first time. I have a number that represents how likely is that a gen should be mutated called mutation rate. I wrote a small function that tells me whether I should mutate or not the gen according to the mutation rate.
What it does is, every time is called, it generates a random number between 0 and 1 and if the number is smaller than the mutation rate then I mutate the current gen. So if, for instance my mutation rate is .1, this function will tell me I should mutate when the random number is smaller than .1.
Now, I'll have probably thousands of gens, and calling this function for every single gen would take some time. So there must be some formula that given a mutation rate, the amount of gens, and some random number, tell me how many gens I should mutate. Any idea? Hope it doesn't involve calculus!
0 comentarios:
Publicar un comentario