API#
This section provides comprehensive details about the exposed ReLife API. ReLife is structured into different modules, each with a clear and specific role. We divided the API documentation close to the same logic.
Base class of every parametric models in ReLife. |
|
Abstract maximum likelihood optimizer. |
Lifetime models#
Parametric lifetime models#
Parametric lifetime distributions
Exponential lifetime distribution. |
|
Weibull lifetime distribution. |
|
Gompertz lifetime distribution. |
|
Gamma lifetime distribution. |
|
Log-logistic probability distribution. |
Parametric lifetime regressions
Proportional Hazard regression. |
|
Accelerated failure time regression. |
Semiparametric lifetime regression#
Class for Cox, semi-parametric, Proportional Hazards, model |
Non parametric lifetime models#
Kaplan-Meier estimator. |
|
Nelson-Aalen estimator. |
|
Empirical Cumulative Distribution Function. |
Conditional lifetime models#
Conditional lifetime models
Left truncated model. |
|
Age replacement model. |
Stochastic processes#
Renewal process. |
|
Renewal reward process. |
|
Non-homogeneous Poisson process. |
Maintenance policies#
Convenient functions to instanciate a policy based on the given model and cost structure.
Creates a preventive age replacement policy. |
|
Creates a run-to-failure policy. |
Lower-level policy classes that can be used in addition to the above functions.
Age replacement policy. |
|
One-cyle age replacement policy. |
|
Run-to-failure renewal policy. |
|
One cyle run-to-failure policy. |
|
Age replacement policy for non-Homogeneous Poisson process. |
Rewards#
Run-to-failure reward. |
|
Age replacement reward. |
|
Exponential discounting. |
Built-in datasets#
Load example dataset of circuit breaker lifetimes. |
|
Load example dataset of insulator string lifetimes with covariates. |
|
Load example dataset of power transformers lifetimes. |
Likelihoods#
Maximum likelihood estimator from lifetime data. |
|
Quadratures#
Quadratures are used a many computations. We don’t use Scipy quadrature implementations as, to our knowledge, they don’t support automatic broadcasting of 2D bounds.
Numerical integration of \(f(x)\) over the interval \([a,b]\) |
|
Numerical integration of \(f(x) * exp(-x)\) over the interval \([a, \infty]\). |
|
Numerical integration of \(f(x)\) over the interval \([a, \infty]\) |
Utils#
Various utilities to help with development.
Convert the input to np.float64 if it is a scalar or an array of np.float64 otherwise. |
|
Reshapes to column array. |
|
Flatten array-like object when possible. |
|
Gets the number of assets encoded in args. |