Parametric
Lifetime distributions with a fixed functional form, fitted by estimating
a few parameters. Each distribution is exported as a ready-made instance
(surpyval.Weibull, surpyval.LogNormal, …). Its fit accepts
any mix of observed, censored and truncated data and returns a
Parametric model; its
from_params builds the same model from known parameters. The
distribution’s own functions (sf, ff, df, hf, Hf,
qf, mean, moment, random, …) can also be called directly
with the parameters as extra arguments, for example
Weibull.sf(x, alpha, beta).
fit supports five estimation methods (how='MLE', 'MPP',
'MOM', 'MSE', 'MPS'), fixed parameters (fixed), an offset
(offset=True), a limited failure population (lfp=True) and zero
inflation (zi=True); fit_best() fits every
candidate distribution and keeps the best (see
Comparison Tests and Validation Metrics). The theory is in
Parametric Estimation and worked examples are in
Parametric SurPyval Modelling.
Parametric Class
The fitted model every distribution’s fit and from_params
returns.
Distribution Classes
Continuous lifetime distributions.
- Exponential Distribution
- Hypoexponential Distribution
- Weibull Distribution
- Exponentiated Weibull Distribution
- Gumbel Distribution
- Gumbel Largest Extreme Value Distribution
- Gamma Distribution
- Normal Distribution
- LogNormal Distribution
- Logistic Distribution
- LogLogistic Distribution
- Uniform Distribution
- Rayleigh Distribution
- Beta Distribution
- Four-Parameter Beta Distribution
Discrete Distribution Classes
Discrete lifetimes on the positive integers, for cycle- or demand-counted data. All accept the same censoring and truncation formats as the continuous distributions.
Special Distributions
Per-demand and degenerate models with no (or a fixed) time dimension, for composing into mixtures, competing risks and demand studies.
Flexible Parametric (Royston-Parmar)
A spline model for data whose hazard no standard distribution fits.
Custom Distributions
Define a new distribution from its cumulative hazard function alone.
Zero-Failure Analysis (Weibayes)
The bound on a Weibull scale of known shape when there are too few failures to fit one, including none.
Mixture Modelling
A population made of several sub-populations, each with its own distribution of the same family.