Class BinomialBounds

Object
org.apache.spark.util.random.BinomialBounds

public class BinomialBounds extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    getLowerBound(double delta, long n, double fraction)
    Returns a threshold p such that if we conduct n Bernoulli trials with success rate = p, it is very unlikely to have more than fraction * n successes.
    static double
    getUpperBound(double delta, long n, double fraction)
    Returns a threshold p such that if we conduct n Bernoulli trials with success rate = p, it is very unlikely to have less than fraction * n successes.
    static double
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 threshold p such that if we conduct n Bernoulli trials with success rate = p, it is very unlikely to have more than fraction * n successes.
      Parameters:
      delta - (undocumented)
      n - (undocumented)
      fraction - (undocumented)
      Returns:
      (undocumented)
    • getUpperBound

      public static double getUpperBound(double delta, long n, double fraction)
      Returns a threshold p such that if we conduct n Bernoulli trials with success rate = p, it is very unlikely to have less than fraction * n successes.
      Parameters:
      delta - (undocumented)
      n - (undocumented)
      fraction - (undocumented)
      Returns:
      (undocumented)