Github user sachingoel0101 commented on the pull request:

    https://github.com/apache/flink/pull/757#issuecomment-117047575
  
    Hi @thvasilo, thanks for taking the time to go through it. 
    Consider for example a probability distribution P(X_0) = 0.2, P(X_1) = 0.3, 
P(X_2) = 0.5
    To sample an element out of X_0, X_1 and X_2, we can generate a random 
number but we need to map intervals of real numbers to the values X_0, X_1 and 
X_2. This is what the discreteSampler does.
    It forms a cumulative distribution as [0.2, 0.5, 1.0] and then, if the 
generated random no is in [0, 0.2), we pick X_0, and so on.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to