Stanz is a scala library for purely functional Bayesian analysis.
import com.github.sdual.stanz.Stanz._
import com.github.sdual.stanz.algorithm.{MetropolisHastings, MetropolisHastingsImpl}
import com.github.sdual.stanz.monad.Distribution
val mh: MetropolisHastings = MetropolisHastingsImpl()
val r = new Random
val n = 100000
val ps: Distribution[(Double, Double)] = points(createTrainingData(), linear())
val sampled = mh.run(n, ps).sample(r)