Skip to content

Commit

Permalink
bumping version because of bug fix. #204
Browse files Browse the repository at this point in the history
  • Loading branch information
CamDavidsonPilon committed Nov 22, 2015
1 parent 4c632b6 commit c6e0e61
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions lifelines/fitters/coxph_fitter.py
Expand Up @@ -223,17 +223,19 @@ def _newton_rhaphson(self, X, T, E, initial_beta=None, step_size=1.,
delta = solve(-h, step_size * g.T)
if np.any(np.isnan(delta)):
raise ValueError("delta contains nan value(s). Convergence halted.")

# Save these as pending result
hessian, gradient = h, g

if norm(delta) < precision:
converging = False

# Only allow small steps
if norm(delta) > 10:
step_size *= 0.5
continue

beta += delta
# Save these as pending result
hessian, gradient = h, g

if norm(delta) < precision:
converging = False

if ((i % 10) == 0) and show_progress:
print("Iteration %d: delta = %.5f" % (i, norm(delta)))
Expand Down
2 changes: 1 addition & 1 deletion lifelines/version.py
@@ -1,3 +1,3 @@
from __future__ import unicode_literals

__version__ = '0.8.0.1'
__version__ = '0.8.0.2'

0 comments on commit c6e0e61

Please sign in to comment.