Releases: rte-france/relife
Releases · rte-france/relife
v2.8.0
Merged PR :
Typing :
- Typing non parametric model with
Generic: it allows to specify available estimations in concrete classes. - Refactoring
utilsand removerelife.type. - Typing Numpy i/o with
optypeshaped arrays : probability functions are typed as if they can expectArrayNDand carry out potential broadcasting correctly. For now, it is not true at runtime but a future PR will solve it.
API changes :
- Refactoring plot method :
model.plot("<fname>", time, *args, **kwargs)instead ofmodel.plot.<fname>(*args, **kwargs). - Modifying module names to plural when it makes sense : e.g.
lifetime_model -> lifetime_models,doc -> docs,stochastic_process -> stochastic_processes, etc. - Rename module
datatodatasets(more explicit) and delegateNHPPDatatonon_homogeneous_poisson_processmodule. @params.setteris replaced byset_paramsbecause@property-paramsdoes not have the same definition. Same for@property-params, it is replaced byget_params.- Removing
nb_params(useless). - Removing
shape/rateattributes (useless) in distributions. - same for
ar,cp,cf, etc. in policies. - Rename
utilsfunctions :to_column_2dandflatten_if_at_least_2dare more explicit. - Remove
FrozenParametricModel. It is useless. Now,FrozenParametricLifetimeModelderived directly fromParametricLifetimeModel[()]. It simplifies typing in policies and stochastic processes asLifetimeDistributionis aParametricLifetimeModel[()], thus is accepted by default as policies input. - Remove
get_model_nb_assets(model)fromutils(useless and avoid circular imports). - Rename
reshape_1d_argtoto_column_2d_if_1d(more explicit). - Removing nested tests in
stochastic_process: all tests are done in onetestsfolder. - Use plural module names if it makes sense.
Important choices :
- For typing,
optype.numpy.ArrayNDis prefered tonumpy.typing.NDArray.
Docstrings :
- If docstrings are too long, when it's needed, add
# noqa: E501.
Future works :
- Solve Numpy broadcasting in every models' functions.
- Typing pytests
- Refactoring tests