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

Comparison of native estimation code with PyLogit #53

Open
smmaurer opened this issue Nov 21, 2018 · 1 comment
Open

Comparison of native estimation code with PyLogit #53

smmaurer opened this issue Nov 21, 2018 · 1 comment

Comments

@smmaurer
Copy link
Member

PyLogit estimation for MNL is more flexible than the native ChoiceModels implementation (originally brought over from urbansim.urbanchoice.mnl), but much slower. See initial experiments here: Destination-choice-models-02.ipynb

What's causing the performance gap? If it would be easy to fix in PyLogit, then we wouldn't need to maintain a separate estimation codebase.

@timothyb0912
Copy link

Let me know what you find as the root cause of the slowness or what you're considering changing!

Also, feel free to open up a pull request! I'm happy to accept any changes that increase estimation speed while not breaking tests. =)

I imagine some of the slowness comes from:

  1. The current version of PyLogit on PyPI using a slow routine for calculating the hessian at the end of the estimation process.
  2. PyLogit not taking advantage of the specific data structures that I think UrbanSim most commonly uses: MNL with generic alternatives.
  3. PyLogit using a single codebase for the estimation of MNL as well as more general asymmetric "logit-type" choice models.

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

2 participants