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

[0.2.dev9] Binary logit & Regression Add ins #119

Merged
merged 3 commits into from
May 16, 2020
Merged

Conversation

cvanoli
Copy link
Contributor

@cvanoli cvanoli commented May 13, 2020

On this PR I'm proposing two small changes:

  • In the binary logit run() function, the df is built with the get_data() function. To the parameters that are passed into this function, I'm adding to the columns to add in the df, the out_columns of the binary model, extra_columns = self.out_column, since this column is then used to set the out_true and out_false result values. I have encountered the issue with a household_relocation_model, that the building_id which is the out_column, was not appearing in the df, because it was not present in the model_expression nor the out_filters. This caused the update of the column full of null values.

  • In the regression models, I've added the lines to save the residuals when the fitting is done, so the modeler can get the residuals with model.residuals for evaluation. The residuals are created using .resid which is an element of the RegressionModel object.

@cvanoli cvanoli requested a review from smmaurer May 13, 2020 18:29
@coveralls
Copy link

coveralls commented May 13, 2020

Coverage Status

Coverage increased (+0.1%) to 91.909% when pulling 061fabf on binary_logit_addin into 03d377e on master.

@smmaurer
Copy link
Member

Hi @cvanoli, this looks great! Thanks for the bug fix and for the improvement to the diagnostic output. It seems like the tests were only failing because of a one-off glitch; I re-started the Travis job and it passed.

I'm going to add a commit updating the changelog, and then merge this!

@smmaurer smmaurer changed the title Binary logit & Regression Add ins [0.2.dev9] Binary logit & Regression Add ins May 16, 2020
@smmaurer smmaurer merged commit ee81862 into master May 16, 2020
@smmaurer smmaurer deleted the binary_logit_addin branch May 16, 2020 00:49
@smmaurer smmaurer mentioned this pull request Feb 11, 2021
7 tasks
smmaurer added a commit that referenced this pull request Feb 12, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants