Tabnine Logo
Beta.regularizedBeta
Code IndexAdd Tabnine to your IDE (free)

How to use
regularizedBeta
method
in
org.apache.commons.math3.special.Beta

Best Java code snippets using org.apache.commons.math3.special.Beta.regularizedBeta (Showing top 20 results out of 315)

origin: org.apache.commons/commons-math3

/** {@inheritDoc} */
public double cumulativeProbability(double x)  {
  if (x <= 0) {
    return 0;
  } else if (x >= 1) {
    return 1;
  } else {
    return Beta.regularizedBeta(x, alpha, beta);
  }
}
origin: deeplearning4j/nd4j

@Override
public double cumulativeProbability(double x) {
  double ret;
  if (x < 0) {
    ret = 0.0D;
  } else if (x >= this.numberOfTrials) {
    ret = 1.0D;
  } else {
    ret = 1.0D - Beta.regularizedBeta(this.probabilityOfSuccess, x + 1.0D, (this.numberOfTrials - x));
  }
  return ret;
}
origin: org.apache.commons/commons-math3

/** {@inheritDoc} */
public double cumulativeProbability(int x) {
  double ret;
  if (x < 0) {
    ret = 0.0;
  } else {
    ret = Beta.regularizedBeta(probabilityOfSuccess,
        numberOfSuccesses, x + 1.0);
  }
  return ret;
}
origin: org.apache.commons/commons-math3

/** {@inheritDoc} */
public double cumulativeProbability(int x) {
  double ret;
  if (x < 0) {
    ret = 0.0;
  } else if (x >= numberOfTrials) {
    ret = 1.0;
  } else {
    ret = 1.0 - Beta.regularizedBeta(probabilityOfSuccess,
        x + 1.0, numberOfTrials - x);
  }
  return ret;
}
origin: deeplearning4j/nd4j

/**
 * {@inheritDoc}
 */
public double cumulativeProbability(int x) {
  double ret;
  if (x < 0) {
    ret = 0.0;
  } else if (x >= numberOfTrials) {
    ret = 1.0;
  } else {
    ret = 1.0 - Beta.regularizedBeta(probabilityOfSuccess, x + 1.0, numberOfTrials - x);
  }
  return ret;
}
origin: org.apache.commons/commons-math3

/**
 * Returns the
 * <a href="http://mathworld.wolfram.com/RegularizedBetaFunction.html">
 * regularized beta function</a> I(x, a, b).
 *
 * @param x Value.
 * @param a Parameter {@code a}.
 * @param b Parameter {@code b}.
 * @return the regularized beta function I(x, a, b).
 * @throws org.apache.commons.math3.exception.MaxCountExceededException
 * if the algorithm fails to converge.
 */
public static double regularizedBeta(double x, double a, double b) {
  return regularizedBeta(x, a, b, DEFAULT_EPSILON, Integer.MAX_VALUE);
}
origin: org.apache.commons/commons-math3

/**
 * Returns the regularized beta function I(x, a, b).
 *
 * @param x the value.
 * @param a Parameter {@code a}.
 * @param b Parameter {@code b}.
 * @param maxIterations Maximum number of "iterations" to complete.
 * @return the regularized beta function I(x, a, b)
 * @throws org.apache.commons.math3.exception.MaxCountExceededException
 * if the algorithm fails to converge.
 */
public static double regularizedBeta(double x,
                   double a, double b,
                   int maxIterations) {
  return regularizedBeta(x, a, b, DEFAULT_EPSILON, maxIterations);
}
origin: org.apache.commons/commons-math3

/**
 * Returns the
 * <a href="http://mathworld.wolfram.com/RegularizedBetaFunction.html">
 * regularized beta function</a> I(x, a, b).
 *
 * @param x Value.
 * @param a Parameter {@code a}.
 * @param b Parameter {@code b}.
 * @param epsilon When the absolute value of the nth item in the
 * series is less than epsilon the approximation ceases to calculate
 * further elements in the series.
 * @return the regularized beta function I(x, a, b)
 * @throws org.apache.commons.math3.exception.MaxCountExceededException
 * if the algorithm fails to converge.
 */
public static double regularizedBeta(double x,
                   double a, double b,
                   double epsilon) {
  return regularizedBeta(x, a, b, epsilon, Integer.MAX_VALUE);
}
origin: org.apache.commons/commons-math3

/** {@inheritDoc} */
public double cumulativeProbability(double x) {
  double ret;
  if (x == 0) {
    ret = 0.5;
  } else {
    double t =
      Beta.regularizedBeta(
        degreesOfFreedom / (degreesOfFreedom + (x * x)),
        0.5 * degreesOfFreedom,
        0.5);
    if (x < 0.0) {
      ret = 0.5 * t;
    } else {
      ret = 1.0 - 0.5 * t;
    }
  }
  return ret;
}
origin: org.apache.commons/commons-math3

/**
 * {@inheritDoc}
 *
 * The implementation of this method is based on
 * <ul>
 *  <li>
 *   <a href="http://mathworld.wolfram.com/F-Distribution.html">
 *   F-Distribution</a>, equation (4).
 *  </li>
 * </ul>
 */
public double cumulativeProbability(double x)  {
  double ret;
  if (x <= 0) {
    ret = 0;
  } else {
    double n = numeratorDegreesOfFreedom;
    double m = denominatorDegreesOfFreedom;
    ret = Beta.regularizedBeta((n * x) / (m + n * x),
      0.5 * n,
      0.5 * m);
  }
  return ret;
}
origin: org.apache.commons/commons-math3

} else if (x > (a + 1) / (2 + b + a) &&
      1 - x <= (b + 1) / (2 + b + a)) {
  ret = 1 - regularizedBeta(1 - x, b, a, epsilon, maxIterations);
} else {
  ContinuedFraction fraction = new ContinuedFraction() {
origin: io.virtdata/virtdata-lib-realer

/** {@inheritDoc} */
public double cumulativeProbability(int x) {
  double ret;
  if (x < 0) {
    ret = 0.0;
  } else {
    ret = Beta.regularizedBeta(probabilityOfSuccess,
        numberOfSuccesses, x + 1.0);
  }
  return ret;
}
origin: io.virtdata/virtdata-lib-realer

/** {@inheritDoc} */
public double cumulativeProbability(double x)  {
  if (x <= 0) {
    return 0;
  } else if (x >= 1) {
    return 1;
  } else {
    return Beta.regularizedBeta(x, alpha, beta);
  }
}
origin: io.virtdata/virtdata-lib-realer

/** {@inheritDoc} */
public double cumulativeProbability(int x) {
  double ret;
  if (x < 0) {
    ret = 0.0;
  } else if (x >= numberOfTrials) {
    ret = 1.0;
  } else {
    ret = 1.0 - Beta.regularizedBeta(probabilityOfSuccess,
        x + 1.0, numberOfTrials - x);
  }
  return ret;
}
origin: geogebra/geogebra

/** {@inheritDoc} */
public double cumulativeProbability(int x) {
  double ret;
  if (x < 0) {
    ret = 0.0;
  } else if (x >= numberOfTrials) {
    ret = 1.0;
  } else {
    ret = 1.0 - Beta.regularizedBeta(probabilityOfSuccess,
        x + 1.0, numberOfTrials - x);
  }
  return ret;
}
origin: geogebra/geogebra

/** {@inheritDoc} */
public double cumulativeProbability(int x) {
  double ret;
  if (x < 0) {
    ret = 0.0;
  } else {
    ret = Beta.regularizedBeta(probabilityOfSuccess,
        numberOfSuccesses, x + 1.0);
  }
  return ret;
}
origin: geogebra/geogebra

/** {@inheritDoc} */
public double cumulativeProbability(double x)  {
  if (x <= 0) {
    return 0;
  } else if (x >= 1) {
    return 1;
  } else {
    return Beta.regularizedBeta(x, alpha, beta);
  }
}
origin: org.nd4j/nd4j-api

@Override
public double cumulativeProbability(double x) {
  double ret;
  if (x < 0) {
    ret = 0.0D;
  } else if (x >= this.numberOfTrials) {
    ret = 1.0D;
  } else {
    ret = 1.0D - Beta.regularizedBeta(this.probabilityOfSuccess, x + 1.0D, (this.numberOfTrials - x));
  }
  return ret;
}
origin: geogebra/geogebra

/**
 * Returns the
 * <a href="http://mathworld.wolfram.com/RegularizedBetaFunction.html">
 * regularized beta function</a> I(x, a, b).
 *
 * @param x Value.
 * @param a Parameter {@code a}.
 * @param b Parameter {@code b}.
 * @return the regularized beta function I(x, a, b).
 * @throws org.apache.commons.math3.exception.MaxCountExceededException
 * if the algorithm fails to converge.
 */
public static double regularizedBeta(double x, double a, double b) {
  return regularizedBeta(x, a, b, DEFAULT_EPSILON, Integer.MAX_VALUE);
}
origin: geogebra/geogebra

/**
 * Returns the regularized beta function I(x, a, b).
 *
 * @param x the value.
 * @param a Parameter {@code a}.
 * @param b Parameter {@code b}.
 * @param maxIterations Maximum number of "iterations" to complete.
 * @return the regularized beta function I(x, a, b)
 * @throws org.apache.commons.math3.exception.MaxCountExceededException
 * if the algorithm fails to converge.
 */
public static double regularizedBeta(double x,
                   double a, double b,
                   int maxIterations) {
  return regularizedBeta(x, a, b, DEFAULT_EPSILON, maxIterations);
}
org.apache.commons.math3.specialBetaregularizedBeta

Javadoc

Returns the regularized beta function I(x, a, b).

Popular methods of Beta

  • deltaMinusDeltaSum
    Returns the value of Δ(b) - Δ(a + b), with 0 ≤ a ≤ b and b ≥ 10. Based on equations (26), (27) and (
  • logBeta
    Returns the natural logarithm of the beta function B(a, b). The implementation of this method is bas
  • logGammaMinusLogGammaSum
    Returns the value of log[Γ(b) / Γ(a + b)] for a ≥ 0 and b ≥ 10. Based on the NSWC Library of Mathem
  • logGammaSum
    Returns the value of log Γ(a + b) for 1 ≤ a, b ≤ 2. Based on theNSWC Library of Mathematics Subrouti
  • sumDeltaMinusDeltaSum
    Returns the value of Δ(p) + Δ(q) - Δ(p + q), with p, q ≥ 10. Based on the NSWC Library of Mathematic

Popular in Java

  • Updating database using SQL prepared statement
  • findViewById (Activity)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JList (javax.swing)
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now