Skip to content

Commit

Permalink
need to set the stop tol a bit higher to get equal or better accuracy
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Aug 14, 2019
1 parent a84571f commit 0553483
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lifelines/fitters/log_logistic_aft_fitter.py
Expand Up @@ -64,6 +64,7 @@ class LogLogisticAFTFitter(ParametericAFTRegressionFitter):

# about 25% faster than BFGS
_scipy_fit_method = "SLSQP"
_scipy_fit_options = {"ftol": 1e-6, "maxiter": 200}

def __init__(self, alpha=0.05, penalizer=0.0, l1_ratio=0.0, fit_intercept=True, model_ancillary=False):
self._ancillary_parameter_name = "beta_"
Expand Down
Expand Up @@ -22,6 +22,7 @@ class PiecewiseExponentialRegressionFitter(ParametricRegressionFitter):

# about 50% faster than BFGS
_scipy_fit_method = "SLSQP"
_scipy_fit_options = {"ftol": 1e-6, "maxiter": 200}

def __init__(self, breakpoints, alpha=0.05, penalizer=0.0):
super(PiecewiseExponentialRegressionFitter, self).__init__(alpha=alpha)
Expand Down
1 change: 1 addition & 0 deletions lifelines/fitters/weibull_aft_fitter.py
Expand Up @@ -65,6 +65,7 @@ class WeibullAFTFitter(ParametericAFTRegressionFitter):

# about 25% faster than BFGS
_scipy_fit_method = "SLSQP"
_scipy_fit_options = {"ftol": 1e-10, "maxiter": 200}

def __init__(self, alpha=0.05, penalizer=0.0, l1_ratio=0.0, fit_intercept=True, model_ancillary=False):
self._ancillary_parameter_name = "rho_"
Expand Down

0 comments on commit 0553483

Please sign in to comment.