Skip to content

Commit

Permalink
Merge pull request #1171 from jamesmyatt/patch-1
Browse files Browse the repository at this point in the history
Pass additional kwargs to npmle function
  • Loading branch information
CamDavidsonPilon committed Nov 20, 2020
2 parents 3d92bb6 + 9bd3f50 commit baefa5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lifelines/fitters/kaplan_meier_fitter.py
Expand Up @@ -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
Expand Down Expand Up @@ -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_

Expand Down

0 comments on commit baefa5d

Please sign in to comment.