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 Summary
Constructors - 
Method Summary
Modifier 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
- 
BinomialBounds
public BinomialBounds() 
 - 
 - 
Method Details
- 
minSamplingRate
public static double minSamplingRate() - 
getLowerBound
public 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)
 
 - 
getUpperBound
public 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)
 
 
 -