Probabilistic functional programming with Baysig/BayesHive
I would like to announce that the Baysig programming language and the
BayesHive analytics environment (http://bayeshive.com) are now
available for beta testers.
Baysig is a new probabilistic, functional and typed programming
language that attempts to realise the vision of "fully Bayesian
computing". That is, in Baysig almost all the work in data processing
consists of building a probabilistic model of the incoming data.
Almost everything else -- optimal decisions, categorisation, measuring
hidden parameters or states, forecasting, testing hypothesis --
becomes trivial. This paradigm can in principle be applied to a large
number of domains, although for the moment we are focusing on models
that are based on continuous parameters. It will therefore be of
interest to users of statistics and dynamical systems models,
including in finance, physics and life sciences.
To analyse data in Baysig, you write a program in the random-number
supply monad that generates simulated data. A special construct,
"estimate", then applies Bayes' theorem to this program and returns
the probability distribution of the model parameters given observed
data. The "estimate" procedure is difficult to implement in Haskell or
similar languages, which encouraged us to develop a new language.
However, in many respects Baysig should feel like Haskell, and we hope
that Baysig will encourage the Haskell community to experiment with
We have built a web-based environment to help users, including those
with little-to-no programming experience, use Baysig, at
bayeshive.com. This web application allows you to upload data from
spreadsheets or timeseries, and to build statistical models with a
point-and-click web interface which ends up generating Baysig code.
Code and the results of running it are collected in shareable and
editable literate programming documents.
We would appreciate any feedback from the Haskell community before
releasing our platform to unsuspecting statisticians and researchers.
Almost everything is written in Haskell, including the Baysig
compiler. The BayesHive website is written using Yesod, with which we
are mostly happy. We also use the Stan package (mc-stan.org), and the
web front-end is written using AngularJS. For the moment the Baysig
language is only available through the BayesHive web interface, but
that will change. If you want to run Baysig on your own computer,
please send me an email at [hidden email].
Finally, both the BayesHive web application and the Baysig language
implementation are still prototypes and very much work-in-progress. We
promise to work hard at fixing the bugs you find!