dimanche 19 septembre 2021

How to generate a random probability distribution julia

I have a list of keys in a dictionary, and I would like to assign a number between 0 and 1 to each item in such a way that the assigned numbers sum to 1. How would one do this? I tried something with rand(), but that didn't work. Any suggestions?




Aucun commentaire:

Enregistrer un commentaire