de.lmu.ifi.dbs.elki.math.statistics.distribution

## Class ExponentiallyModifiedGaussianDistribution

• All Implemented Interfaces:
Distribution

@Alias(value="exgaussian")
public class ExponentiallyModifiedGaussianDistribution
extends AbstractDistribution
Exponentially modified Gaussian (EMG) distribution (ExGaussian distribution) is a combination of a normal distribution and an exponential distribution. Note that scipy uses a subtly different parameterization. TODO: implement quantile function!
Since:
0.6.0
Author:
Erich Schubert
• ### Nested Class Summary

Nested Classes
Modifier and Type Class and Description
static class  ExponentiallyModifiedGaussianDistribution.Parameterizer
Parameterization class
• ### Field Summary

Fields
Modifier and Type Field and Description
private double lambda
Exponential rate.
private double mean
Mean value for the generator
private double stddev
Standard deviation
• ### Fields inherited from class de.lmu.ifi.dbs.elki.math.statistics.distribution.AbstractDistribution

random
• ### Constructor Summary

Constructors
Constructor and Description
ExponentiallyModifiedGaussianDistribution(double mean, double stddev, double lambda)
Constructor for ExGaussian distribution
ExponentiallyModifiedGaussianDistribution(double mean, double stddev, double lambda, java.util.Random random)
Constructor for ExGaussian distribution
ExponentiallyModifiedGaussianDistribution(double mean, double stddev, double lambda, RandomFactory random)
Constructor for ExGaussian distribution
• ### Method Summary

All Methods
Modifier and Type Method and Description
double cdf(double val)
Return the cumulative density function at the given value.
static double cdf(double x, double mu, double sigma, double lambda)
Cumulative probability density function (CDF) of an exgauss distribution.
double getLambda()
double getMean()
double getStddev()
double logpdf(double val)
Return the log density of an existing value
static double logpdf(double x, double mu, double sigma, double lambda)
Probability density function of the ExGaussian distribution.
double nextRandom()
Generate a new random value
double pdf(double val)
Return the density of an existing value
static double pdf(double x, double mu, double sigma, double lambda)
Probability density function of the ExGaussian distribution.
double quantile(double q)
Deprecated.
Not yet implemented!
static double quantile(double x, double mu, double sigma, double lambda)
Deprecated.
Not yet implemented!
java.lang.String toString()
Describe the distribution
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
• ### Field Detail

• #### mean

private double mean
Mean value for the generator
• #### stddev

private double stddev
Standard deviation
• #### lambda

private double lambda
Exponential rate.
• ### Constructor Detail

• #### ExponentiallyModifiedGaussianDistribution

public ExponentiallyModifiedGaussianDistribution(double mean,
double stddev,
double lambda,
java.util.Random random)
Constructor for ExGaussian distribution
Parameters:
mean - Mean
stddev - Standard Deviation
lambda - Rate
random - Random
• #### ExponentiallyModifiedGaussianDistribution

public ExponentiallyModifiedGaussianDistribution(double mean,
double stddev,
double lambda,
RandomFactory random)
Constructor for ExGaussian distribution
Parameters:
mean - Mean
stddev - Standard Deviation
lambda - Rate
random - Random
• #### ExponentiallyModifiedGaussianDistribution

public ExponentiallyModifiedGaussianDistribution(double mean,
double stddev,
double lambda)
Constructor for ExGaussian distribution
Parameters:
mean - Mean
stddev - Standard Deviation
lambda - Rate
• ### Method Detail

• #### pdf

public double pdf(double val)
Description copied from interface: Distribution
Return the density of an existing value
Parameters:
val - existing value
Returns:
distribution density
• #### logpdf

public double logpdf(double val)
Description copied from interface: Distribution
Return the log density of an existing value
Parameters:
val - existing value
Returns:
log distribution density
• #### cdf

public double cdf(double val)
Description copied from interface: Distribution
Return the cumulative density function at the given value.
Parameters:
val - existing value
Returns:
cumulative density
• #### quantile

@Deprecated
public double quantile(double q)
Deprecated. Not yet implemented!
Description copied from interface: Distribution
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
Parameters:
q - Quantile to find
Returns:
Quantile position
• #### nextRandom

public double nextRandom()
Description copied from interface: Distribution
Generate a new random value
Specified by:
nextRandom in interface Distribution
Overrides:
nextRandom in class AbstractDistribution
Returns:
new random value
• #### toString

public java.lang.String toString()
Description copied from interface: Distribution
Describe the distribution
Specified by:
toString in interface Distribution
Overrides:
toString in class java.lang.Object
Returns:
description
• #### getMean

public double getMean()
Returns:
the mean
• #### getStddev

public double getStddev()
Returns:
the standard deviation
• #### getLambda

public double getLambda()
Returns:
the lambda value.
• #### pdf

public static double pdf(double x,
double mu,
double sigma,
double lambda)
Probability density function of the ExGaussian distribution.
Parameters:
x - The value.
mu - The mean.
sigma - The standard deviation.
lambda - Rate parameter.
Returns:
PDF of the given exgauss distribution at x.
• #### logpdf

public static double logpdf(double x,
double mu,
double sigma,
double lambda)
Probability density function of the ExGaussian distribution.
Parameters:
x - The value.
mu - The mean.
sigma - The standard deviation.
lambda - Rate parameter.
Returns:
PDF of the given exgauss distribution at x.
• #### cdf

public static double cdf(double x,
double mu,
double sigma,
double lambda)
Cumulative probability density function (CDF) of an exgauss distribution.
Parameters:
x - value to evaluate CDF at.
mu - Mean value.
sigma - Standard deviation.
lambda - Rate parameter.
Returns:
The CDF of the given exgauss distribution at x.
• #### quantile

@Deprecated
public static double quantile(double x,
double mu,
double sigma,
double lambda)
Deprecated. Not yet implemented!
Inverse cumulative probability density function (probit) of an exgauss distribution.
Parameters:
x - value to evaluate probit function at.
mu - Mean value.
sigma - Standard deviation.
lambda - Rate parameter.
Returns:
The probit of the given exgauss distribution at x.