Class ExponentiallyModifiedGaussianDistribution
- java.lang.Object
-
- elki.math.statistics.distribution.ExponentiallyModifiedGaussianDistribution
-
- All Implemented Interfaces:
Distribution
@Alias("exgaussian") public class ExponentiallyModifiedGaussianDistribution extends java.lang.Object implements Distribution
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 Description static class
ExponentiallyModifiedGaussianDistribution.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.distribution.Distribution
Distribution.Parameterizer
-
-
Constructor Summary
Constructors Constructor Description ExponentiallyModifiedGaussianDistribution(double mean, double stddev, double lambda)
Constructor for ExGaussian distribution
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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 valuestatic double
logpdf(double x, double mu, double sigma, double lambda)
Probability density function of the ExGaussian distribution.double
nextRandom(java.util.Random random)
Generate a new random valuedouble
pdf(double val)
Return the density of an existing valuestatic 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
-
-
-
Method Detail
-
pdf
public double pdf(double val)
Description copied from interface:Distribution
Return the density of an existing value- Specified by:
pdf
in interfaceDistribution
- 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- Specified by:
logpdf
in interfaceDistribution
- 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.- Specified by:
cdf
in interfaceDistribution
- 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.- Specified by:
quantile
in interfaceDistribution
- Parameters:
q
- Quantile to find- Returns:
- Quantile position
-
nextRandom
public double nextRandom(java.util.Random random)
Description copied from interface:Distribution
Generate a new random value- Specified by:
nextRandom
in interfaceDistribution
- Parameters:
random
- Random number generator- Returns:
- new random value
-
toString
public java.lang.String toString()
Description copied from interface:Distribution
Describe the distribution- Specified by:
toString
in interfaceDistribution
- Overrides:
toString
in classjava.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.
-
-