Skip to content

Instantly share code, notes, and snippets.

@puyokw
Created February 24, 2016 10:30
Show Gist options
  • Save puyokw/b1c9daf011b6200b4e8c to your computer and use it in GitHub Desktop.
Save puyokw/b1c9daf011b6200b4e8c to your computer and use it in GitHub Desktop.
td_intern rossmann
INSERT OVERWRITE TABLE prediction
SELECT
rowid,
EXP(predicted)-1 as predicted
FROM(
SELECT
rowid,
avg(predicted) AS predicted
FROM(
SELECT
t.rowid,
tree_predict(p.model_id, p.model_type, p.pred_model, t.features, false) as predicted
FROM
model p
LEFT OUTER JOIN testing3 t
) t1
group by
rowid
) t2;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment