[0.2.dev9] Binary logit & Regression Add ins #119
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
On this PR I'm proposing two small changes:
In the binary logit
run()
function, the df is built with theget_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 thebuilding_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 theRegressionModel
object.