Skip to content

Example of using Rainier library for Bayesian logistic regression in Scala.

Notifications You must be signed in to change notification settings

espears4sq/rainier-logistic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rainier-logistic

An example of probabilistic inference on synthetic data with the rainier library.

Run sbt compile and sbt run to generate a summary of a toy logistic regression demonstrating calculation of posterior mean, standard deviation, and 95% credible intervals for an intercept term and a slope term, such as:

[info] Running logistic
          Regression Summary
------------------------------------
          ||       b0   ||        b1
------------------------------------
mean      ||   00.029   ||    00.298
std. dev. ||   00.069   ||    00.026
2.5 pctl  ||   -0.108   ||    00.249
50 pctl   ||   00.030   ||    00.297
97.5 pctl ||   00.164   ||    00.164
------------------------------------

The program also writes two image files into the /images folder: traceplots.png and pairs.png, which implement monte carlo trace plots and parameter correlation (pairs) plots, like below:

traceplot

pairsplot

citations

This code is modified from the blog post below, retrieved on 07/27/2018.

About

Example of using Rainier library for Bayesian logistic regression in Scala.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages