Java org.apache.commons.math3.random EmpiricalDistribution fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.math3.random EmpiricalDistribution fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.math3.random EmpiricalDistribution.

The text is from its open source code.

Field

intDEFAULT_BIN_COUNT
Default bin count

Constructor

EmpiricalDistribution(int binCount, RandomGenerator generator)
Creates a new EmpiricalDistribution with the specified bin count using the provided RandomGenerator as the source of random data.
EmpiricalDistribution(int binCount, RandomDataImpl randomData)
Creates a new EmpiricalDistribution with the specified bin count using the provided RandomDataImpl instance as the source of random data.
EmpiricalDistribution(int binCount, RandomDataGenerator randomData)
Private constructor to allow lazy initialisation of the RNG contained in the #randomData instance variable.
EmpiricalDistribution(int binCount)
Creates a new EmpiricalDistribution with the specified bin count.
EmpiricalDistribution(RandomGenerator generator)
Creates a new EmpiricalDistribution with default bin count using the provided RandomGenerator as the source of random data.
EmpiricalDistribution(RandomDataImpl randomData)
Creates a new EmpiricalDistribution with default bin count using the provided RandomDataImpl as the source of random data.
EmpiricalDistribution()
Creates a new EmpiricalDistribution with the default bin count.

Method

doublecumulativeProbability(double x)

Algorithm description:

  1. Find the bin B that x belongs to.
  2. Compute P(B) = the mass of B and P(B-) = the combined mass of the bins below B.
  3. Compute K(B) = the probability mass of B with respect to the within-bin kernel and K(B-) = the kernel distribution evaluated at the lower endpoint of B
  4. Return P(B-) + P(B) * [K(x) - K(B-)] / K(B) where K(x) is the within-bin kernel distribution function evaluated at x.

ListgetBinStats()
Returns a List of SummaryStatistics instances containing statistics describing the values in each of the bins.
doublegetNumericalMean()
double[]getUpperBounds()

Returns a fresh copy of the array of upper bounds for the bins.

voidload(double[] in)
Computes the empirical distribution from the provided array of numbers.
voidload(URL url)
Computes the empirical distribution using data read from a URL.
voidload(File file)
Computes the empirical distribution from the input file.
doubleprobability(double x0, double x1)
For a random variable X whose values are distributed according to this distribution, this method returns P(x0 < X <= x1) .