WeibullDistribution<T>
Models & Types · AiDotNet.Distributions
Represents a Weibull probability distribution.
Inheritance: DistributionBase<T> → WeibullDistribution<T>
For Beginners
The Weibull distribution is extremely flexible for modeling “time until failure” data:
- Shape < 1: Failure rate decreases over time (infant mortality)
- Shape = 1: Constant failure rate (random failures) - same as Exponential
- Shape > 1: Failure rate increases over time (wear-out failures)
This makes it ideal for predicting when machines or products will fail.
How It Works
The Weibull distribution is widely used in reliability engineering, survival analysis, and extreme value theory. It can model increasing, decreasing, or constant failure rates depending on the shape parameter.
PDF: f(x) = (k/λ) * (x/λ)^(k-1) * exp(-(x/λ)^k) for x ≥ 0
Constructors
| Constructor | Summary |
|---|---|
WeibullDistribution(T shape, T scale) |
Initializes a new Weibull distribution. |
Properties
| Property | Summary |
|---|---|
T Mean { get; } |
|
T Scale { get; } |
Gets the scale parameter (λ). |
T Shape { get; } |
Gets the shape parameter (k). |
T Variance { get; } |
|
Vector<T> Parameters { get; set; } |
|
int NumParameters { get; } |
|
string[] ParameterNames { get; } |
Methods
| Method | Summary |
|---|---|
Matrix<T> FisherInformation() |
|
T Cdf(T x) |
|
T InverseCdf(T p) |
|
T LogPdf(T x) |
|
T Pdf(T x) |
|
T Sample(Random random) |
|
Vector<T> GradLogPdf(T x) |