|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Double>
gov.sandia.cognition.statistics.AbstractClosedFormSmoothUnivariateDistribution
gov.sandia.cognition.statistics.distribution.LogNormalDistribution
@PublicationReference(author="Wikipedia",
title="Log-normal distribution",
type=WebPage,
year=2009,
url="http://en.wikipedia.org/wiki/Log-normal_distribution")
public class LogNormalDistributionLog-Normal distribution PDF and CDF implementations. The Log-Normal distribution is related to a UnivariateGaussian where the natural logarithm of the random variable is normally distributed. This turns up in application areas that are the product of some random variables, where each random variable is i.i.d. and normally distributed. Stock market returns are the classic example of a Log-Normal distribution.
| Nested Class Summary | |
|---|---|
static class |
LogNormalDistribution.CDF
CDF of the Log-Normal Distribution |
static class |
LogNormalDistribution.MaximumLikelihoodEstimator
Maximum Likelihood Estimator of a log-normal distribution. |
static class |
LogNormalDistribution.PDF
PDF of a Log-normal distribution |
static class |
LogNormalDistribution.WeightedMaximumLikelihoodEstimator
Maximum Likelihood Estimator from weighted data |
| Field Summary | |
|---|---|
static double |
DEFAULT_LOG_NORMAL_MEAN
Default log normal mean, 0.0. |
static double |
DEFAULT_LOG_NORMAL_VARIANCE
Default log normal variance, 1.0. |
static double |
SQRT2PI
Constant value of Math.sqrt(2*Math.PI) |
| Constructor Summary | |
|---|---|
LogNormalDistribution()
Default constructor. |
|
LogNormalDistribution(double logNormalMean,
double logNormalVariance)
Creates a new instance of LogNormalDistribution |
|
LogNormalDistribution(LogNormalDistribution other)
Copy Constructor |
|
| Method Summary | |
|---|---|
void |
convertFromVector(Vector parameters)
Sets the parameters of the distribution from a 2-dimensional Vector with ( logNormalMean logNormalVariance ) |
Vector |
convertToVector()
Returns a 2-dimensional Vector with ( logNormalMean logNormalVariance ) |
LogNormalDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution. |
LogNormalDistribution.MaximumLikelihoodEstimator |
getEstimator()
Gets an estimator associated with this distribution. |
double |
getLogNormalMean()
Getter for logNormalMean |
double |
getLogNormalVariance()
Getter for logNormalVariance |
Double |
getMaxSupport()
Gets the minimum support (domain or input) of the distribution. |
Double |
getMean()
Gets the arithmetic mean, or "first central moment" or "expectation", of the distribution. |
Double |
getMinSupport()
Gets the minimum support (domain or input) of the distribution. |
LogNormalDistribution.PDF |
getProbabilityFunction()
Gets the distribution function associated with this Distribution, either the PDF or PMF. |
double |
getVariance()
Gets the variance of the distribution. |
ArrayList<Double> |
sample(Random random,
int numSamples)
Draws multiple random samples from the distribution. |
void |
setLogNormalMean(double logNormalMean)
Setter for logNormalMean |
void |
setLogNormalVariance(double logNormalVariance)
Setter for logNormalVariance |
String |
toString()
|
| Methods inherited from class gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution |
|---|
clone |
| Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution |
|---|
sample |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.sandia.cognition.statistics.Distribution |
|---|
sample |
| Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable |
|---|
clone |
| Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable |
|---|
clone |
| Field Detail |
|---|
public static final double DEFAULT_LOG_NORMAL_MEAN
public static final double DEFAULT_LOG_NORMAL_VARIANCE
public static final double SQRT2PI
| Constructor Detail |
|---|
public LogNormalDistribution()
public LogNormalDistribution(double logNormalMean,
double logNormalVariance)
logNormalMean - Mean of the underlying distribution, (-infinity,+infinity)logNormalVariance - Variance of the underlying distribution, (0,infinity)public LogNormalDistribution(LogNormalDistribution other)
other - LogNormalDistribution to copy| Method Detail |
|---|
public Vector convertToVector()
convertToVector in interface Vectorizablepublic void convertFromVector(Vector parameters)
convertFromVector in interface Vectorizableparameters - 2-dimensional Vector with ( logNormalMean logNormalVariance )public double getLogNormalMean()
public void setLogNormalMean(double logNormalMean)
logNormalMean - Mean of the underlying distribution, (-infinity,+infinity)public double getLogNormalVariance()
public void setLogNormalVariance(double logNormalVariance)
logNormalVariance - Variance of the underlying distribution, (0,infinity)public Double getMean()
DistributionWithMean
getMean in interface DistributionWithMean<Double>getMean in interface SmoothUnivariateDistributionpublic double getVariance()
UnivariateDistribution
getVariance in interface UnivariateDistribution<Double>
public ArrayList<Double> sample(Random random,
int numSamples)
Distribution
sample in interface Distribution<Double>random - Random-number generator to use in order to generate random numbers.numSamples - Number of samples to draw from the distribution.
public LogNormalDistribution.CDF getCDF()
UnivariateDistribution
getCDF in interface ClosedFormUnivariateDistribution<Double>getCDF in interface SmoothUnivariateDistributiongetCDF in interface UnivariateDistribution<Double>public LogNormalDistribution.PDF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction in interface ComputableDistribution<Double>getProbabilityFunction in interface SmoothUnivariateDistributionpublic String toString()
toString in class Objectpublic Double getMinSupport()
UnivariateDistribution
getMinSupport in interface UnivariateDistribution<Double>public Double getMaxSupport()
UnivariateDistribution
getMaxSupport in interface UnivariateDistribution<Double>public LogNormalDistribution.MaximumLikelihoodEstimator getEstimator()
EstimableDistribution
getEstimator in interface EstimableDistribution<Double,LogNormalDistribution>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||