add optional params to predict function
This commit is contained in:
@@ -21,7 +21,9 @@ $$ LANGUAGE plpythonu;
|
||||
CREATE OR REPLACE FUNCTION
|
||||
CDB_GWR_Predict(subquery text, dep_var text, ind_vars text[],
|
||||
bw numeric default null, fixed boolean default False,
|
||||
kernel text default 'bisquare')
|
||||
kernel text default 'bisquare',
|
||||
geom_col text default 'the_geom',
|
||||
id_col text default 'cartodb_id')
|
||||
RETURNS table(coeffs JSON, stand_errs JSON, t_vals JSON,
|
||||
r_squared numeric, predicted numeric, rowid bigint)
|
||||
AS $$
|
||||
@@ -29,6 +31,6 @@ AS $$
|
||||
from crankshaft.regression import GWR
|
||||
gwr = GWR()
|
||||
|
||||
return gwr.gwr_predict(subquery, dep_var, ind_vars, bw, fixed, kernel)
|
||||
return gwr.gwr_predict(subquery, dep_var, ind_vars, bw, fixed, kernel, geom_col, id_col)
|
||||
|
||||
$$ LANGUAGE plpythonu;
|
||||
|
||||
Reference in New Issue
Block a user