clean up code and loose ends on data provider changes

This commit is contained in:
Andy Eschbacher
2017-01-04 14:40:37 -05:00
parent fd9d08dfbc
commit dbee19723e
3 changed files with 14 additions and 15 deletions
+5 -3
View File
@@ -1,11 +1,13 @@
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, filtered_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, rowid bigint, bandwidth numeric)
AS $$
from crankshaft.regression import gwr_cs
from crankshaft.regression import GWR
return gwr_cs.gwr(subquery, dep_var, ind_vars, bw, fixed, kernel)
gwr = GWR()
return gwr.gwr(subquery, dep_var, ind_vars, bw, fixed, kernel)
$$ LANGUAGE plpythonu;