ParametricLifetimeModel#
- class relife.lifetime_model.ParametricLifetimeModel(**kwparams)[source]#
Base class for parametric lifetime models in ReLife.
This class is a blueprint for implementing parametric lifetime models. The interface is generic and can define a variadic set of arguments. It expects implementation of the hazard function (
hf), the cumulative hazard function (chf), the probability density function (pdf) and the survival function (sf). Other functions are implemented by default but can be overridden by the derived classes.- Note:
The abstract methods also provides a default implementation. One may not have to implement
hf,chf,pdfandsfand just callsuper()to access the base implementation.- Methods:
hf: Abstract method to compute the hazard function. chf: Abstract method to compute the cumulative hazard function. sf: Abstract method to compute the survival function. pdf: Abstract method to compute the probability density function.
Methods
cdfchfhfichfisfls_integratemeanmedianmomentmrlpdfppfrvssfvar- property nb_params#
Number of parameters.
- Returns:
- int
Number of parameters.
- property params#
Parameters values.
- Returns:
- ndarray
Parameters values
Notes
If parameter values are not set, they are encoded as np.nan value.
- property params_names#
Parameters names.
- Returns:
- list of str
Parameters names
Notes
Parameters values can be requested (a.k.a. get) by their name at instance level.
- property plot#
Provides access to plotting functionnalities