From fd16a94a16d403deed783aabca1a1bc14e64b3fb Mon Sep 17 00:00:00 2001 From: Ab2nour <61651582+Ab2nour@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:14:08 +0100 Subject: [PATCH 1/2] feat(models): add gamma model --- src/modelisation/univariate/parametric/models.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/modelisation/univariate/parametric/models.py b/src/modelisation/univariate/parametric/models.py index 090270d..52a4b66 100644 --- a/src/modelisation/univariate/parametric/models.py +++ b/src/modelisation/univariate/parametric/models.py @@ -1,6 +1,6 @@ -from lifelines import ExponentialFitter, LogNormalFitter, WeibullFitter +from lifelines import ExponentialFitter, LogNormalFitter, WeibullFitter, GeneralizedGammaFitter -model_type = LogNormalFitter | ExponentialFitter | WeibullFitter +model_type = LogNormalFitter | ExponentialFitter | WeibullFitter | GeneralizedGammaFitter def create_models() -> dict[str, model_type]: @@ -8,6 +8,7 @@ def create_models() -> dict[str, model_type]: "Weibull": WeibullFitter(), "Exponentiel": ExponentialFitter(), "Log-normal": LogNormalFitter(), + "Gamma-généralisée": GeneralizedGammaFitter(), } return models From 6701e2b72a6081fa2397427209124b1868187a6a Mon Sep 17 00:00:00 2001 From: Ab2nour <61651582+Ab2nour@users.noreply.github.com> Date: Tue, 14 Nov 2023 20:04:13 +0100 Subject: [PATCH 2/2] style: run black --- src/modelisation/univariate/parametric/models.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/modelisation/univariate/parametric/models.py b/src/modelisation/univariate/parametric/models.py index 52a4b66..8f631f9 100644 --- a/src/modelisation/univariate/parametric/models.py +++ b/src/modelisation/univariate/parametric/models.py @@ -1,6 +1,13 @@ -from lifelines import ExponentialFitter, LogNormalFitter, WeibullFitter, GeneralizedGammaFitter +from lifelines import ( + ExponentialFitter, + GeneralizedGammaFitter, + LogNormalFitter, + WeibullFitter, +) -model_type = LogNormalFitter | ExponentialFitter | WeibullFitter | GeneralizedGammaFitter +model_type = ( + LogNormalFitter | ExponentialFitter | WeibullFitter | GeneralizedGammaFitter +) def create_models() -> dict[str, model_type]: