|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectorg.apache.spark.util.random.BernoulliSampler<T>
public class BernoulliSampler<T>
:: DeveloperApi :: A sampler based on Bernoulli trials.
param: fraction the sampling fraction, aka Bernoulli sampling probability
Constructor Summary | |
---|---|
BernoulliSampler(double fraction,
scala.reflect.ClassTag<T> evidence$1)
|
Method Summary | |
---|---|
BernoulliSampler<T> |
clone()
return a copy of the RandomSampler object |
scala.collection.Iterator<T> |
sample(scala.collection.Iterator<T> items)
take a random sample |
void |
setSeed(long seed)
Set random seed. |
Methods inherited from class Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BernoulliSampler(double fraction, scala.reflect.ClassTag<T> evidence$1)
Method Detail |
---|
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 Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |