Skip to content

Commit

Permalink
worn in the case on non-convergence
Browse files Browse the repository at this point in the history
  • Loading branch information
Eh2406 committed May 4, 2018
1 parent 2497039 commit eab97ea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions urbansim/urbanchoice/mnl.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ def mnl_estimate(data, chosen, numalts, GPU=False, coeffrange=(-3, 3),
approx_grad=False,
bounds=bounds
)

if bfgs_result[2]['warnflag'] > 0:
logger.warn("mnl did not converge correctly: %s", bfgs_result)

beta = bfgs_result[0]
stderr = mnl_loglik(
beta, data, chosen, numalts, weights, stderr=1, lcgrad=lcgrad)
Expand Down

0 comments on commit eab97ea

Please sign in to comment.