[ 
https://issues.apache.org/jira/browse/FLINK-2533?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14736012#comment-14736012
 ] 

ASF GitHub Bot commented on FLINK-2533:
---------------------------------------

GitHub user gallenvara opened a pull request:

    https://github.com/apache/flink/pull/1110

    [FLINK-2533] [core] Gap based random sample optimization.

    For random sampler with fraction, like BernoulliSampler and PoissonSampler, 
Gap based random sampler could exploit O(np) sample implementation instead of 
previous O(n) sample implementation, it should perform better while sample 
fraction is very small.When deal with large fraction, it's better to use 
previous sample implementation. So we add a threshold to control the sampling 
method according to the fraction.(threshold_Bernoulli = 0.33, threshold_Poisson 
= 0.4)
    
![bernoullisampler](https://cloud.githubusercontent.com/assets/12931563/9751893/fd4195a2-56dc-11e5-8937-30ebfa927960.PNG)
    
![poissonsampler](https://cloud.githubusercontent.com/assets/12931563/9751894/fd4c35a2-56dc-11e5-9d71-e7b62e5dcc05.PNG)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gallenvara/flink gap_sampling

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/1110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1110
    
----
commit b4b431471736cd32a50b49cc9e91e038a4387808
Author: gallenvara <[email protected]>
Date:   2015-09-07T06:55:11Z

    [FLINK-2533] [core] Gap based random sample optimization.

----


> Gap based random sample optimization
> ------------------------------------
>
>                 Key: FLINK-2533
>                 URL: https://issues.apache.org/jira/browse/FLINK-2533
>             Project: Flink
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Chengxiang Li
>            Priority: Minor
>
> For random sampler with fraction, like BernoulliSampler and PoissonSampler, 
> Gap based random sampler could exploit O(k) sample implementation instead of 
> previous O\(n\) sample implementation, it should perform better while sample 
> fraction is very small. [This 
> blog|http://erikerlandson.github.io/blog/2014/09/11/faster-random-samples-with-gap-sampling/]
>  describes more detail about gap based random sampler.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to