Class RandomSampler<T>

  • Type Parameters:
    T - The type of sampler data.
    Direct Known Subclasses:
    BernoulliSampler, DistributedRandomSampler, PoissonSampler

    @Internal
    public abstract class RandomSampler<T>
    extends Object
    A data sample is a set of data selected from a statistical population by a defined procedure. RandomSampler helps to create data sample randomly.
    • Constructor Detail

      • RandomSampler

        public RandomSampler()
    • Method Detail

      • sample

        public abstract Iterator<T> sample​(Iterator<T> input)
        Randomly sample the elements from input in sequence, and return the result iterator.
        Parameters:
        input - Source data
        Returns:
        The sample result.