UDST / choicemodels

Python library for discrete choice modeling
https://udst.github.io/choicemodels
BSD 3-Clause "New" or "Revised" License
74 stars 33 forks source link

Where is development happening? #1

Closed Eh2406 closed 5 years ago

Eh2406 commented 8 years ago

Hi, how can we get involved. We need to build a household choice model soon and are happy to help. Where is development happening? Where is it being discussed?

cc: @smmaurer @semcogli

waddell commented 8 years ago

Hi, glad to know you're ready to help. Most of the discussion is happening in person with @smmaurer and @timothyb0912 and Feras at Berkeley, and we're in the process of planning the addition of sampling methods to support location choice models now -- trying to get that done in the next month or so. Hoping to have an example for using this from orca/urbansim not long after that. We'll try to make more of the issues/roadmap visible as github issues, to make it more transparent going forward. But it is still in a formative stage right now.

waddell commented 8 years ago

What kind of choice model are you planning to build?

Eh2406 commented 8 years ago

I believe we are building a household choose model, but I am new so @semcogli can give you more details.

In person is fast. I get how in the formative stage speed is important. When you have time to slow down, we are hear to work together on it.

waddell commented 8 years ago

Sounds good. I'll close this for now and we'll be forking the UAL branch to UDST as soon as we can, at which point issues will be easier to engage with.

semcogli commented 8 years ago

@Eh2406 Paul and others,

As Jacob said, we are looking forward to building HH location choice model for the new forecast. And we would like to test out this new model. From the user conference presentation, it looks like pylogit can handle estimation if the choice sample is random but is still not ready for more complicated situation, such as sampling housing units from buildings, which may have one or more units. I assume the sampling method you are working on will include this? Anyway, it will be our pleasure to test this new model and integrate it in our forecast work.

@Eh2406 @smmaurer

smmaurer commented 7 years ago

Hi, I wanted to add some information here.

The core estimation libraries that are going into ChoiceModels are in good shape, and for now you can find them at timothyb0912/pylogit and ual/lccm.

ChoiceModels will add optimizations for large choice sets and sampling of alternatives, and have an API that's more similar to Statsmodels. That work is happening in the ual/choicemodels fork, but it's still early in development.

@eh2406 @semcogli In the meantime, the UrbanSim library already has a module that works well for household location choice with random sampling of alternatives. It's the MNLDiscreteChoiceModel class in urbansim.models, and there are usage examples in MTC's Bay Area UrbanSim repo and other places.

Hope this helps!

bridwell commented 7 years ago

I'm not sure if this helps, or how to best collaborate, but we've done a fair amount of work on the prediction/simulation side, specifically in regard to sampling of alternatives when the alternatives have capacities (I don't believe this is supported in the Urbansim DCM at this time). The typical use case is for a household location choice model with household variables such as income as well as building variables such as price. The constraint here would be the number of vacant units.

This is still going through some refactoring and re-development, but see: https://github.com/AZMAG/smartpy_core/blob/master/smartpy_core/choice.py#L491 https://github.com/AZMAG/smartpy_core/blob/master/smartpy_core/tests/test_choice.py#L146

This notebook demonstrates the usage and does some stress testing for a super trivial example: https://github.com/AZMAG/smartpy_core/blob/master/smartpy_core/notebooks/choice_with_sampling_testing.ipynb