jeudi 30 juin 2022

DolphinDB random sample functions

Can I sample an array a = [1, 2, 3, 4] based on the specified probabilities p = [0.1, 0.1, 0.3, 0.5]? For example, in python I can use np.random.choice(a=[1, 2, 3, 4], size=100, p=[0.1, 0.1, 0.3, 0.5])




Aucun commentaire:

Enregistrer un commentaire