Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable MNL coefficient bounds #219

Open
smmaurer opened this issue Oct 11, 2019 · 0 comments
Open

Configurable MNL coefficient bounds #219

smmaurer opened this issue Oct 11, 2019 · 0 comments

Comments

@smmaurer
Copy link
Member

In the MNL estimation code there are bounds set on the coefficient values, i guess so that unstable models will converge on something. The default bounds are (-3, 3), which is often too restrictive, especially if the estimation data isn't normalized.

https://github.com/UDST/urbansim/blob/master/urbansim/urbanchoice/mnl.py#L178
https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_l_bfgs_b.html

The bounds are configurable if you call the estimation function directly, but not if you’re using higher-level tools like the MNLDiscreteChoiceModel class.

We should consider adding a global setting for this. The user would control it by calling something like urbansim.MNL_ESTIMATION_COEF_BOUNDS = (-10,10), and it would persist for the length of the Python session. This is not super elegant, but it would be easy to add into the codebase without making very many changes and without breaking any downstream code.

See also: UDST/urbansim_templates#116

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant