From 9bd3f5048b9a990f42117de73879d0ac77358047 Mon Sep 17 00:00:00 2001 From: James Myatt Date: Thu, 19 Nov 2020 23:35:58 +0000 Subject: [PATCH] Pass additional kwargs to npmle function --- lifelines/fitters/kaplan_meier_fitter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lifelines/fitters/kaplan_meier_fitter.py b/lifelines/fitters/kaplan_meier_fitter.py index bbdb19da3..dc43369fd 100644 --- a/lifelines/fitters/kaplan_meier_fitter.py +++ b/lifelines/fitters/kaplan_meier_fitter.py @@ -127,6 +127,7 @@ def fit_interval_censoring( weights=None, tol: float = 1e-5, show_progress: bool = False, + **kwargs, ) -> "KaplanMeierFitter": """ Fit the model to a interval-censored dataset using non-parametric MLE. This estimator is @@ -205,7 +206,7 @@ def fit_interval_censoring( self._label = coalesce(label, self._label, "NPMLE_estimate") - results = npmle(self.lower_bound, self.upper_bound, verbose=show_progress, tol=tol, weights=weights) + results = npmle(self.lower_bound, self.upper_bound, verbose=show_progress, tol=tol, weights=weights, **kwargs) self.survival_function_ = reconstruct_survival_function(*results, self.timeline, label=self._label).loc[self.timeline] self.cumulative_density_ = 1 - self.survival_function_