public abstract class AbstractDistribution extends java.lang.Object implements Distribution
| Constructor and Description |
|---|
AbstractDistribution() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
inverseTransformSampling()
Use inverse transform sampling (also known as the inverse probability
integral transform or inverse transformation method or Smirnov transform)
to draw a sample from the given distribution.
|
double |
likelihood(double[] x)
The likelihood given a sample set following the distribution.
|
double |
logLikelihood(double[] x)
The likelihood given a sample set following the distribution.
|
protected double |
quantile(double p,
double xmin,
double xmax)
Inversion of CDF by bisection numeric root finding of "cdf(x) = p"
for continuous distribution.
|
protected double |
quantile(double p,
double xmin,
double xmax,
double eps)
Inversion of CDF by bisection numeric root finding of "cdf(x) = p"
for continuous distribution.
|
protected double |
rejection(double pmax,
double xmin,
double xmax)
Use the rejection technique to draw a sample from the given distribution.
|
protected double rejection(double pmax,
double xmin,
double xmax)
Rejection sampling is usually used in cases where the form of f(x) makes sampling difficult. Instead of sampling directly from the distribution f(x), we use an envelope distribution M g(x) where sampling is easier. These samples from M g(x) are probabilistically accepted or rejected.
This method relates to the general field of Monte Carlo techniques, including Markov chain Monte Carlo algorithms that also use a proxy distribution to achieve simulation from the target distribution f(x). It forms the basis for algorithms such as the Metropolis algorithm.
protected double inverseTransformSampling()
protected double quantile(double p,
double xmin,
double xmax,
double eps)
protected double quantile(double p,
double xmin,
double xmax)
public double likelihood(double[] x)
likelihood in interface Distributionpublic double logLikelihood(double[] x)
logLikelihood in interface Distribution