Class WeibullDistribution
- java.lang.Object
-
- elki.math.statistics.distribution.WeibullDistribution
-
- All Implemented Interfaces:
Distribution
public class WeibullDistribution extends java.lang.Object implements Distribution
Weibull distribution.- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
WeibullDistribution.Par
Parameterization class-
Nested classes/interfaces inherited from interface elki.math.statistics.distribution.Distribution
Distribution.Parameterizer
-
-
Constructor Summary
Constructors Constructor Description WeibullDistribution(double k, double lambda)
Constructor.WeibullDistribution(double k, double lambda, double theta)
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 k, double lambda, double theta)
CDF of Weibull distributiondouble
getK()
Get the shape k parameter.double
getLambda()
Get the scale lambda parameter.double
getTheta()
Get the shift theta parameter.double
logpdf(double x)
Return the log density of an existing valuestatic double
logpdf(double x, double k, double lambda, double theta)
PDF of Weibull distributiondouble
nextRandom(java.util.Random random)
Generate a new random valuedouble
pdf(double x)
Return the density of an existing valuestatic double
pdf(double x, double k, double lambda, double theta)
PDF of Weibull distributiondouble
quantile(double val)
Quantile aka probit (for normal) aka inverse CDF (invcdf, cdf^-1) function.static double
quantile(double val, double k, double lambda, double theta)
Quantile function of Weibull distributionjava.lang.String
toString()
Describe the distribution
-
-
-
Constructor Detail
-
WeibullDistribution
public WeibullDistribution(double k, double lambda)
Constructor.- Parameters:
k
- Shape parameterlambda
- Scale parameter
-
WeibullDistribution
public WeibullDistribution(double k, double lambda, double theta)
Constructor.- Parameters:
k
- Shape parameterlambda
- Scale parametertheta
- Shift offset parameter
-
-
Method Detail
-
getK
public double getK()
Get the shape k parameter.- Returns:
- shape k
-
getLambda
public double getLambda()
Get the scale lambda parameter.- Returns:
- scale lambda
-
getTheta
public double getTheta()
Get the shift theta parameter.- Returns:
- shift theta
-
pdf
public double pdf(double x)
Description copied from interface:Distribution
Return the density of an existing value- Specified by:
pdf
in interfaceDistribution
- Parameters:
x
- existing value- Returns:
- distribution density
-
logpdf
public double logpdf(double x)
Description copied from interface:Distribution
Return the log density of an existing value- Specified by:
logpdf
in interfaceDistribution
- Parameters:
x
- existing value- Returns:
- log distribution density
-
pdf
public static double pdf(double x, double k, double lambda, double theta)
PDF of Weibull distribution- Parameters:
x
- Valuek
- Shape parameterlambda
- Scale parametertheta
- Shift offset parameter- Returns:
- PDF at position x.
-
logpdf
public static double logpdf(double x, double k, double lambda, double theta)
PDF of Weibull distribution- Parameters:
x
- Valuek
- Shape parameterlambda
- Scale parametertheta
- Shift offset parameter- Returns:
- PDF at position x.
-
cdf
public static double cdf(double val, double k, double lambda, double theta)
CDF of Weibull distribution- Parameters:
val
- Valuek
- Shape parameterlambda
- Scale parametertheta
- Shift offset parameter- Returns:
- CDF at position x.
-
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
-
quantile
public static double quantile(double val, double k, double lambda, double theta)
Quantile function of Weibull distribution- Parameters:
val
- Valuek
- Shape parameterlambda
- Scale parametertheta
- Shift offset parameter- Returns:
- Quantile function at position x.
-
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
-
-