Skip to content

Commit

Permalink
Save regression residuals as object element
Browse files Browse the repository at this point in the history
  • Loading branch information
cvanoli committed May 13, 2020
1 parent b86b735 commit a2a3448
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion urbansim_templates/models/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def __init__(self, tables=None, model_expression=None, filters=None, out_tables=
# Placeholders for model fit data, filled in by fit() or from_dict()
self.summary_table = None
self.fitted_parameters = None
self.residuals = None
self.model = None


Expand Down Expand Up @@ -189,7 +190,7 @@ def fit(self):
# code later on to not rely on RegressionModel any more.

self.fitted_parameters = results.params.tolist()

self.residuals = results.resid

def run(self):
"""
Expand Down

0 comments on commit a2a3448

Please sign in to comment.