T - The type of sample.public class Poisson<T> extends Sampler<T>
emptyIterable, EPSILON| Constructor and Description |
|---|
Poisson(double fraction)
Create a poisson sampler which can sample elements with replacement.
|
Poisson(double fraction,
long seed)
Create a poisson sampler which can sample elements with replacement.
|
| Modifier and Type | Method and Description |
|---|---|
Iterator<T> |
sample(Iterator<T> input)
Sample the input elements, for each input element, generate its count following a poisson
distribution.
|
public Poisson(double fraction,
long seed)
fraction - The expected count of each element.seed - Random number generator seed for internal PoissonDistribution.public Poisson(double fraction)
fraction - The expected count of each element.Copyright © 2024 CDAP Licensed under the Apache License, Version 2.0.