Package org.apache.spark.util.random
Class BinomialBounds
Object
org.apache.spark.util.random.BinomialBounds
Utility functions that help us determine bounds on adjusted sampling rate to guarantee exact
 sample size with high confidence when sampling without replacement.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic doublegetLowerBound(double delta, long n, double fraction) Returns a thresholdpsuch that if we conduct n Bernoulli trials with success rate =p, it is very unlikely to have more thanfraction * nsuccesses.static doublegetUpperBound(double delta, long n, double fraction) Returns a thresholdpsuch that if we conduct n Bernoulli trials with success rate =p, it is very unlikely to have less thanfraction * nsuccesses.static double
- 
Constructor Details- 
BinomialBoundspublic BinomialBounds()
 
- 
- 
Method Details- 
minSamplingRatepublic static double minSamplingRate()
- 
getLowerBoundpublic static double getLowerBound(double delta, long n, double fraction) Returns a thresholdpsuch that if we conduct n Bernoulli trials with success rate =p, it is very unlikely to have more thanfraction * nsuccesses.- Parameters:
- delta- (undocumented)
- n- (undocumented)
- fraction- (undocumented)
- Returns:
- (undocumented)
 
- 
getUpperBoundpublic static double getUpperBound(double delta, long n, double fraction) Returns a thresholdpsuch that if we conduct n Bernoulli trials with success rate =p, it is very unlikely to have less thanfraction * nsuccesses.- Parameters:
- delta- (undocumented)
- n- (undocumented)
- fraction- (undocumented)
- Returns:
- (undocumented)
 
 
-