Last active
March 28, 2020 03:48
-
-
Save eigenfoo/8917e2fd72ea8940d54916c1cfbe1755 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def linear_regression(x): | |
scale = yield tfd.HalfCauchy(0, 1) | |
coefs = yield tfd.Normal(tf.zeros(x.shape[1]), 1, ) | |
predictions = yield tfd.Normal(tf.linalg.matvec(x, coefs), scale) | |
return predictions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment