Skip to content

Instantly share code, notes, and snippets.

@avibryant
Created March 27, 2020 20:41
Show Gist options
  • Save avibryant/863ed4af96bd6db03f077d0cdb2a6f62 to your computer and use it in GitHub Desktop.
Save avibryant/863ed4af96bd6db03f077d0cdb2a6f62 to your computer and use it in GitHub Desktop.
Distributions3.scala
val a = Real.latent{a => a.mean(0) && a.stdDev(1)}
val b = Real.latent{b => b.mean(0) && b.stdDev(1)}
val xs: Seq[Double] = ???
val ys: Seq[Long] = ???
Model.observe(xs, ys){(x,y)=>
y.mean(a + x*b)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment