public class LogNormalDistribution extends AbstractDistribution
Modifier and Type | Field and Description |
---|---|
double |
mu
The mean of normal distribution.
|
double |
sigma
The standard deviation of normal distribution.
|
Constructor and Description |
---|
LogNormalDistribution(double mu,
double sigma)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
cdf(double x)
Cumulative distribution function.
|
double |
entropy()
Shannon entropy of the distribution.
|
static LogNormalDistribution |
fit(double[] data)
Estimates the distribution parameters by MLE.
|
int |
length()
The number of parameters of the distribution.
|
double |
logp(double x)
The density at x in log scale, which may prevents the underflow problem.
|
double |
mean()
The mean of distribution.
|
double |
p(double x)
The probability density function for continuous distribution
or probability mass function for discrete distribution at x.
|
double |
quantile(double p)
The quantile, the probability to the left of quantile is p.
|
double |
rand()
Generates a random number following this distribution.
|
java.lang.String |
toString() |
double |
variance()
The variance of distribution.
|
inverseTransformSampling, quantile, quantile, rejection
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
likelihood, logLikelihood, rand, sd
public final double mu
public final double sigma
public LogNormalDistribution(double mu, double sigma)
mu
- the mean of normal distribution.sigma
- the standard deviation of normal distribution.public static LogNormalDistribution fit(double[] data)
public int length()
Distribution
public double mean()
Distribution
public double variance()
Distribution
public double entropy()
Distribution
public java.lang.String toString()
toString
in class java.lang.Object
public double rand()
Distribution
public double p(double x)
Distribution
public double logp(double x)
Distribution
public double cdf(double x)
Distribution
public double quantile(double p)
Distribution