Class InverseGaussianDistribution
- java.lang.Object
-
- elki.math.statistics.distribution.InverseGaussianDistribution
-
- All Implemented Interfaces:
Distribution
@Alias({"invgauss","wald"}) public class InverseGaussianDistribution extends java.lang.Object implements Distribution
Inverse Gaussian distribution aka Wald distribution.Beware that SciPy uses a different location parameter.
InverseGaussian(a, x) ~ scipy.stats.invgauss(a/x, x)
Our parameter scheme is in line with common literature. SciPy naming scheme has comparable notion of location and scale across distributions. So both have their benefits.
- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
InverseGaussianDistribution.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.distribution.Distribution
Distribution.Parameterizer
-
-
Constructor Summary
Constructors Constructor Description InverseGaussianDistribution(double mean, double shape)
Constructor for Inverse Gaussian / Wald 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 shape)
Cumulative probability density function (CDF) of a Wald distribution.double
getMean()
Mean parameter.double
getShape()
Shape parameter.double
logpdf(double val)
Return the log density of an existing valuestatic double
logpdf(double x, double mu, double shape)
Probability density function of the Wald 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 shape)
Probability density function of the Wald distribution.double
quantile(double q)
Deprecated.NOT YET IMPLEMENTED.static double
quantile(double x, double mu, double shape)
Deprecated.NOT YET IMPLEMENTED.java.lang.String
toString()
Describe the distribution
-
-
-
Method Detail
-
getMean
public double getMean()
Mean parameter.- Returns:
- Mean
-
getShape
public double getShape()
Shape parameter.- Returns:
- Shape
-
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
-
pdf
public static double pdf(double x, double mu, double shape)
Probability density function of the Wald distribution.- Parameters:
x
- The value.mu
- The mean.shape
- Shape parameter- Returns:
- PDF of the given Wald distribution at x.
-
logpdf
public static double logpdf(double x, double mu, double shape)
Probability density function of the Wald distribution.- Parameters:
x
- The value.mu
- The mean.shape
- Shape parameter- Returns:
- log PDF of the given Wald distribution at x.
-
cdf
public static double cdf(double x, double mu, double shape)
Cumulative probability density function (CDF) of a Wald distribution.- Parameters:
x
- value to evaluate CDF atmu
- Mean valueshape
- Shape parameter- Returns:
- The CDF of the given Wald distribution at x.
-
quantile
@Deprecated public static double quantile(double x, double mu, double shape)
Deprecated.NOT YET IMPLEMENTED.Inverse cumulative probability density function (probit) of a Wald distribution.- Parameters:
x
- value to evaluate probit function atmu
- Mean valueshape
- Shape parameter- Returns:
- The probit of the given Wald distribution at x.
-
-