|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object org.apache.spark.util.random.BernoulliCellSampler<T>
public class BernoulliCellSampler<T>
:: DeveloperApi :: A sampler based on Bernoulli trials for partitioning a data sequence.
param: lb lower bound of the acceptance range param: ub upper bound of the acceptance range param: complement whether to use the complement of the range specified, default to false
Constructor Summary | |
---|---|
BernoulliCellSampler(double lb,
double ub,
boolean complement)
|
Method Summary | |
---|---|
BernoulliCellSampler<T> |
clone()
return a copy of the RandomSampler object |
BernoulliCellSampler<T> |
cloneComplement()
Return a sampler that is the complement of the range specified of the current sampler. |
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 BernoulliCellSampler(double lb, double ub, boolean complement)
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 BernoulliCellSampler<T> cloneComplement()
public BernoulliCellSampler<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 |