adds basic pgsql file

This commit is contained in:
Andy Eschbacher 2016-11-28 14:33:23 -05:00
parent 76bd7ff783
commit 8b061bac72

11
src/pg/sql/21_gwr.sql Normal file
View File

@ -0,0 +1,11 @@
CREATE OR REPLACE FUNCTION
CDB_GWR(subquery text, dep_var text, ind_vars text[],
fixed boolean default False, kernel text default 'bisquare')
RETURNS table(v1 numeric, v2 numeric, v3 numeric, v4 numeric, v5 numeric, v6 numeric, rowid bigint)
AS $$
from crankshaft.regression import gwr
return gwr(subquery, dep_var, ind_vars, fixed, kernel)
$$ LANGUAGE plpythonu;