Skip to content

Commit

Permalink
Merge pull request #88 from UDST/small_mnl_output_col_update
Browse files Browse the repository at this point in the history
change out_choosers to out_tables syntax to match small MNL
  • Loading branch information
mxndrwgrdnr committed Jan 31, 2019
2 parents 570e6ef + 9ea29d2 commit add2cb9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions urbansim_templates/models/small_multinomial_logit.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,16 +374,16 @@ def run(self):
choice_ix_1d = choice_ix + (np.arange(num_obs) * num_alts)

choices = long_df._alt_id.values.take(choice_ix_1d)

# Save results to the class object (via df to include indexes)
long_df['_probability'] = probs
self.probabilities = long_df[['_obs_id', '_alt_id', '_probability']]
df['_choices'] = choices
self.choices = df._choices

# Save to Orca
update_column(table = self.out_choosers,
fallback_table = self.choosers,
column = self.out_column,
fallback_column = self.choice_column,
data = self.choices)
update_column(table=self.out_tables,
fallback_table=self.tables,
column=self.out_column,
fallback_column=self.choice_column,
data=self.choices)

0 comments on commit add2cb9

Please sign in to comment.