Skip to content

Configurable MNL coefficient bounds #219

@smmaurer

Description

@smmaurer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions