@Alias(value="DoubleExponentialDistribution") public class LaplaceDistribution extends AbstractDistribution
Modifier and Type | Class and Description |
---|---|
static class |
LaplaceDistribution.Parameterizer
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
(package private) double |
location
Location parameter.
|
(package private) double |
rate
Rate, inverse of mean
|
random
Constructor and Description |
---|
LaplaceDistribution(double rate)
Constructor.
|
LaplaceDistribution(double rate,
double location)
Constructor.
|
LaplaceDistribution(double rate,
double location,
Random random)
Constructor.
|
LaplaceDistribution(double rate,
double location,
RandomFactory random)
Constructor.
|
LaplaceDistribution(double rate,
Random random)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
cdf(double val)
Return the cumulative density function at the given value.
|
static double |
cdf(double val,
double rate)
Cumulative density, static version
|
double |
nextRandom()
This method currently uses the naive approach of returning
-log(uniform) . |
double |
pdf(double val)
Return the density of an existing value
|
static double |
pdf(double val,
double rate)
PDF, static version
|
double |
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.
|
static double |
quantile(double val,
double rate,
double location)
Quantile function, static version
|
String |
toString()
Describe the distribution
|
public LaplaceDistribution(double rate)
rate
- Rate parameter (1/scale)public LaplaceDistribution(double rate, double location)
rate
- Rate parameter (1/scale)location
- Location parameterpublic LaplaceDistribution(double rate, Random random)
rate
- Rate parameter (1/scale)random
- Random generatorpublic LaplaceDistribution(double rate, double location, Random random)
rate
- Rate parameter (1/scale)location
- Location parameterrandom
- Random generatorpublic LaplaceDistribution(double rate, double location, RandomFactory random)
rate
- Rate parameter (1/scale)location
- Location parameterrandom
- Random generatorpublic double pdf(double val)
Distribution
val
- existing valuepublic static double pdf(double val, double rate)
val
- Value to compute PDF atrate
- Rate parameter (1/scale)public double cdf(double val)
Distribution
val
- existing valuepublic static double cdf(double val, double rate)
val
- Value to compute CDF atrate
- Rate parameter (1/scale)public double quantile(double val)
Distribution
val
- Quantile to findpublic static double quantile(double val, double rate, double location)
val
- Value to compute quantile forrate
- Rate parameterlocation
- Location parameterpublic double nextRandom()
-log(uniform)
.nextRandom
in interface Distribution
nextRandom
in class AbstractDistribution
public String toString()
Distribution
toString
in interface Distribution
toString
in class Object
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.