Skip to content

Commit

Permalink
Make sure LocationChoiceModel is in the urbansim.model namespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
jiffyclub committed Apr 18, 2014
1 parent 3dd7877 commit 4193f12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions urbansim/models/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .hedonic import HedonicModel, HedonicModelGroup
from .lcm import LocationChoiceModel
3 changes: 2 additions & 1 deletion urbansim/models/lcm.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ def fit(self, choosers, alternatives, current_choice):
"""
_, merged, chosen = interaction.mnl_interaction_dataset(
choosers, alternatives, self.sample_size, current_choice)
model_design = dmatrix(self.model_expression, data=merged)
model_design = dmatrix(
self.model_expression, data=merged, return_type='dataframe')
fit, results = mnl.mnl_estimate(
model_design.as_matrix(), chosen, self.sample_size)
self.fit_results = results
Expand Down

0 comments on commit 4193f12

Please sign in to comment.