Skip to content

Instantly share code, notes, and snippets.

@harisankarh
Created March 12, 2018 15:28
Show Gist options
  • Save harisankarh/eccefe7572b64a636ff1e37f2b8301ab to your computer and use it in GitHub Desktop.
Save harisankarh/eccefe7572b64a636ff1e37f2b8301ab to your computer and use it in GitHub Desktop.
SELECT *,
(CASE
WHEN ((x1*w_00 + x2*w_10) + b_0) > 0.0 THEN ((x1*w_00 + x2*w_10) + b_0)
ELSE 0.0
END) AS d0,
(CASE
WHEN ((x1*w_01 + x2*w_11) + b_0) > 0.0 THEN ((x1*w_01 + x2*w_11) + b_1)
ELSE 0.0
END) AS d1
FROM {inner subquery}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment