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
as shown above, the d >= randomWeight should be d > randomWeight
It is going to cause a probability error.
if totalWeight == X+Y+Z , weights = [X, X+Y, X+Y+Z]
d >= randomWeight split ranges like [0, X], (X, X+Y], (X+Y, X+Y+Z) d > randomWeight split ranges like [0, X), [X, X+Y),[X+Y, X+Y+Z)
as we know, the randomWeight is a random number in [0, X+Y+Z)
it means when d >= randomWeight first range's probability will be large than the weight/totalWeight
and last range's probability will be less than the weight/totalWeight
as shown above, the
d >= randomWeight
should bed > randomWeight
It is going to cause a probability error.
if totalWeight == X+Y+Z , weights = [X, X+Y, X+Y+Z]
d >= randomWeight
split ranges like [0, X], (X, X+Y], (X+Y, X+Y+Z)d > randomWeight
split ranges like [0, X), [X, X+Y),[X+Y, X+Y+Z)as we know, the randomWeight is a random number in [0, X+Y+Z)
it means when
d >= randomWeight
first range's probability will be large than the weight/totalWeightand last range's probability will be less than the weight/totalWeight
so the correct is
d > randomWeight
the fix commit #376
The text was updated successfully, but these errors were encountered: