public class BernoulliSampler<T> extends java.lang.Object implements RandomSampler<T,T>
param: fraction the sampling fraction, aka Bernoulli sampling probability
Constructor and Description |
---|
BernoulliSampler(double fraction,
scala.reflect.ClassTag<T> evidence$1) |
public BernoulliSampler(double fraction, scala.reflect.ClassTag<T> evidence$1)
public void setSeed(long seed)
Pseudorandom
setSeed
in interface Pseudorandom
public scala.collection.Iterator<T> sample(scala.collection.Iterator<T> items)
RandomSampler
sample
in interface RandomSampler<T,T>
public BernoulliSampler<T> clone()
RandomSampler
clone
in interface RandomSampler<T,T>
clone
in class java.lang.Object