Class GeneralizedLogisticDistribution
- java.lang.Object
-
- elki.math.statistics.distribution.GeneralizedLogisticDistribution
-
- All Implemented Interfaces:
Distribution
public class GeneralizedLogisticDistribution extends java.lang.Object implements Distribution
Generalized logistic distribution. (Type I, Skew-logistic distribution)One of multiple ways of generalizing the logistic distribution.
pdf(x) = shape * exp(-x) / (1 + exp(-x))**(shape+1)
cdf(x) = pow(1+exp(-x), -shape)
Whereshape=1
yields the regular logistic distribution.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeneralizedLogisticDistribution.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.distribution.Distribution
Distribution.Parameterizer
-
-
Constructor Summary
Constructors Constructor Description GeneralizedLogisticDistribution(double location, double scale, double shape)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description double
cdf(double val)
Return the cumulative density function at the given value.static double
cdf(double val, double loc, double scale, double shape)
Cumulative density function.static double
logcdf(double val, double loc, double scale, double shape)
log Cumulative density function.double
logpdf(double val)
Return the log density of an existing valuestatic double
logpdf(double val, double loc, double scale, double shape)
log Probability density function.double
nextRandom(java.util.Random random)
Generate a new random valuedouble
pdf(double val)
Return the density of an existing valuestatic double
pdf(double val, double loc, double scale, double shape)
Probability density function.double
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.static double
quantile(double val, double loc, double scale, double shape)
Quantile function.java.lang.String
toString()
Describe the distribution
-
-
-
Method Detail
-
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
-
pdf
public static double pdf(double val, double loc, double scale, double shape)
Probability density function.- Parameters:
val
- Valueloc
- Locationscale
- Scaleshape
- Shape- Returns:
-
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
-
logpdf
public static double logpdf(double val, double loc, double scale, double shape)
log Probability density function.- Parameters:
val
- Valueloc
- Locationscale
- Scaleshape
- Shape- Returns:
- log PDF
-
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
-
cdf
public static double cdf(double val, double loc, double scale, double shape)
Cumulative density function.- Parameters:
val
- Valueloc
- Locationscale
- Scaleshape
- Shape- Returns:
- CDF
-
logcdf
public static double logcdf(double val, double loc, double scale, double shape)
log Cumulative density function. TODO: untested.- Parameters:
val
- Valueloc
- Locationscale
- Scaleshape
- Shape- Returns:
- log PDF
-
quantile
public static double quantile(double val, double loc, double scale, double shape)
Quantile function.- Parameters:
val
- Valueloc
- Locationscale
- Scaleshape
- Shape- Returns:
- Quantile
-
quantile
public double quantile(double val)
Description copied from interface:Distribution
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.- Specified by:
quantile
in interfaceDistribution
- Parameters:
val
- 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
-
-