mardi 21 août 2018

Drawing random float from probability distribution with dynamic mean in python

I am looking for a way to draw a random float from a probability distribution of which the mean or loc has the value of a node in a model. On top of this, the numbers drawn should not exceed the range of [-1.0, 1.0] and should not have more than 1 decimal.

Kinda like this

So if the value of the node is lets say 0.8, loc should be 0.8, but values outside 1 can't be drawn. I'm really new to programming so if anyone can give me any tips on whether this is possible to begin with it would be much appreciated. With normal([loc, scale, size] its not possible I think. Thanks in advance




Aucun commentaire:

Enregistrer un commentaire