From f4ccfe712b50614d8151716529de494ef1804db4 Mon Sep 17 00:00:00 2001 From: Taylor Oshan Date: Tue, 29 Nov 2016 11:49:19 -0700 Subject: [PATCH] flatten results --- src/py/crankshaft/crankshaft/regression/gwr_cs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/py/crankshaft/crankshaft/regression/gwr_cs.py b/src/py/crankshaft/crankshaft/regression/gwr_cs.py index 36fbde1..5be4630 100644 --- a/src/py/crankshaft/crankshaft/regression/gwr_cs.py +++ b/src/py/crankshaft/crankshaft/regression/gwr_cs.py @@ -69,9 +69,9 @@ def gwr(subquery, dep_var, ind_vars, coefficients = [] stand_errs = [] t_vals = [] - predicted = model.predy + predicted = model.predy.flatten() residuals = model.resid_response - r_squared = model.localR2 + r_squared = model.localR2.flatten() for idx in xrange(n): coefficients.append(json.dumps({var: model.params[idx, k]