Skip to content

Instantly share code, notes, and snippets.

@cicdw
Last active November 10, 2017 15:59
Show Gist options
  • Save cicdw/ec4b39ff036049e0b82a7cf9fb64eeef to your computer and use it in GitHub Desktop.
Save cicdw/ec4b39ff036049e0b82a7cf9fb64eeef to your computer and use it in GitHub Desktop.
Code Snippets for Medium blog post
def predict_over_time(x, y, z, overlay=False):
"Predicts a quantity at times = 0, 1, ... 14"
out = np.zeros((x.shape[0], 15))
for t in range(15):
out[:, t] = t * x ** 2 + y - 2 * z - 2 * t
adj = 1.5 if overlay else 1.0
return adj * out
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment