You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, does weighted_pick() return random characters?
with sampling_type=1, return(int(np.searchsorted(t, np.random.rand(1)*s))) looks like giving a random choice out of the array t. And that's what I'm having right now. Is it intentional? Or am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Now I got it. t = np.cumsum(weights) makes words with higher probability to have bigger interval just before itself and that makes the seemingly random choice to be weighted pick. Makes sense.
Hi, does
weighted_pick()
return random characters?with
sampling_type=1
,return(int(np.searchsorted(t, np.random.rand(1)*s)))
looks like giving a random choice out of the array t. And that's what I'm having right now. Is it intentional? Or am I doing something wrong?The text was updated successfully, but these errors were encountered: