@Alias(value="lognormal") public class LogNormalDistribution extends AbstractDistribution
Modifier and Type | Class and Description |
---|---|
static class |
LogNormalDistribution.Parameterizer
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
private double |
logmean
Mean value for the generator
|
private double |
logstddev
Standard deviation
|
private double |
shift
Additional shift factor
|
random
Constructor and Description |
---|
LogNormalDistribution(double logmean,
double logstddev,
double shift)
Constructor.
|
LogNormalDistribution(double logmean,
double logstddev,
double shift,
java.util.Random random)
Constructor for Log-Normal distribution
|
LogNormalDistribution(double logmean,
double logstddev,
double shift,
RandomFactory random)
Constructor for Log-Normal distribution
|
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)
Cumulative probability density function (CDF) of a normal distribution.
|
double |
getLogMean()
Get the log mean value.
|
double |
getLogStddev()
Get the log standard deviation.
|
double |
getShift()
Get the distribution shift.
|
double |
logpdf(double val)
Return the log density of an existing value
|
static double |
logpdf(double x,
double mu,
double sigma)
Probability density function of the normal 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)
Probability density function of the normal distribution.
|
double |
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
|
static double |
quantile(double x,
double mu,
double sigma)
Inverse cumulative probability density function (probit) of a normal
distribution.
|
java.lang.String |
toString()
Describe the distribution
|
private double logmean
private double logstddev
private double shift
public LogNormalDistribution(double logmean, double logstddev, double shift, java.util.Random random)
logmean
- Meanlogstddev
- Standard Deviationshift
- Shifting offsetrandom
- Random generatorpublic LogNormalDistribution(double logmean, double logstddev, double shift, RandomFactory random)
logmean
- Meanlogstddev
- Standard Deviationshift
- Shifting offsetrandom
- Random generatorpublic LogNormalDistribution(double logmean, double logstddev, double shift)
logmean
- Meanlogstddev
- Standard deviationshift
- Shifting offsetpublic double getLogMean()
public double getLogStddev()
public double getShift()
public double pdf(double val)
Distribution
val
- existing valuepublic double logpdf(double val)
Distribution
val
- existing valuepublic double cdf(double val)
Distribution
val
- existing valuepublic double quantile(double val)
Distribution
val
- Quantile to findpublic static double pdf(double x, double mu, double sigma)
1/(SQRT(2*pi)*sigma*x) * e^(-log(x-mu)^2/2sigma^2)
x
- The value.mu
- The mean.sigma
- The standard deviation.public static double logpdf(double x, double mu, double sigma)
1/(SQRT(2*pi)*sigma*x) * e^(-log(x-mu)^2/2sigma^2)
x
- The value.mu
- The mean.sigma
- The standard deviation.public static double cdf(double x, double mu, double sigma)
x
- value to evaluate CDF atmu
- Mean valuesigma
- Standard deviation.public static double quantile(double x, double mu, double sigma)
x
- value to evaluate probit function atmu
- Mean valuesigma
- Standard deviation.public double nextRandom()
Distribution
nextRandom
in interface Distribution
nextRandom
in class AbstractDistribution
public java.lang.String toString()
Distribution
toString
in interface Distribution
toString
in class java.lang.Object
Copyright © 2019 ELKI Development Team. License information.