From b049da415532b41fcca147f872ed866b7e52a893 Mon Sep 17 00:00:00 2001 From: Andy Eschbacher Date: Wed, 4 Jan 2017 16:36:46 -0500 Subject: [PATCH] switch order of rowid to be last in output signature --- src/pg/sql/21_gwr.sql | 2 +- src/py/crankshaft/crankshaft/regression/gwr_cs.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pg/sql/21_gwr.sql b/src/pg/sql/21_gwr.sql index 07f4b08..5890c8f 100644 --- a/src/pg/sql/21_gwr.sql +++ b/src/pg/sql/21_gwr.sql @@ -1,7 +1,7 @@ CREATE OR REPLACE FUNCTION CDB_GWR(subquery text, dep_var text, ind_vars text[], bw numeric default null, fixed boolean default False, kernel text default 'bisquare') -RETURNS table(coeffs JSON, stand_errs JSON, t_vals JSON, predicted numeric, residuals numeric, r_squared numeric, rowid bigint, bandwidth numeric) +RETURNS table(coeffs JSON, stand_errs JSON, t_vals JSON, predicted numeric, residuals numeric, r_squared numeric, bandwidth numeric, rowid bigint) AS $$ from crankshaft.regression import GWR diff --git a/src/py/crankshaft/crankshaft/regression/gwr_cs.py b/src/py/crankshaft/crankshaft/regression/gwr_cs.py index cc5b8c1..3b812cf 100644 --- a/src/py/crankshaft/crankshaft/regression/gwr_cs.py +++ b/src/py/crankshaft/crankshaft/regression/gwr_cs.py @@ -89,4 +89,4 @@ class GWR: for k, var in enumerate(ind_vars)})) return zip(coeffs, stand_errs, t_vals, - predicted, residuals, r_squared, rowid, bw) + predicted, residuals, r_squared, bw, rowid)