Re: Probabilistic programming in Haskell with bali-phy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probabilistic programming in Haskell with bali-phy

oleg-30

It seems worth mentioning then another Haskell embedded language for
probabilistic programming

        http://okmij.org/ftp/kakuritu/Hakaru10/index.html

It also lets us write probabilistic models as Haskell programs. It
supports both discrete and continuous distributions, conditioning, as
well as branching (mixing models). It takes care to statically
preclude senseless models (forcing conditioning only on external
data). The 'Model' is *not* a monad. Not everything can be or should
be a monad. Hakaru10 also takes care to avoid the problems that are
frequent in implementations of Wingate algorithms. It also uses
incremental evaluation.

As to semantic problems of probabilistic programming languages,
        http://okmij.org/ftp/kakuritu/index.html
shows a couple of them.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probabilistic programming in Haskell with bali-phy

Sergiu Ivanov-2
Hello Oleg,

Thus quoth  Oleg  at 11:29 on Thu, Jun 15 2017:
>
> It seems worth mentioning then another Haskell embedded language for
> probabilistic programming
>
>         http://okmij.org/ftp/kakuritu/Hakaru10/index.html
[...]
> As to semantic problems of probabilistic programming languages,
>         http://okmij.org/ftp/kakuritu/index.html
> shows a couple of them.

Thanks a lot for the references!  I'll keep them at hand.

(And yes, I do agree that not everything should be a monad :-) )

--
Sergiu

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

signature.asc (497 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probabilistic programming in Haskell with bali-phy

Alexander Kjeldaas
I guess https://github.com/adscib/monad-bayes is relevant as well.

On Thu, Jun 15, 2017 at 1:44 PM, Sergiu Ivanov <[hidden email]> wrote:
Hello Oleg,

Thus quoth  Oleg  at 11:29 on Thu, Jun 15 2017:
>
> It seems worth mentioning then another Haskell embedded language for
> probabilistic programming
>
>         http://okmij.org/ftp/kakuritu/Hakaru10/index.html
[...]
> As to semantic problems of probabilistic programming languages,
>         http://okmij.org/ftp/kakuritu/index.html
> shows a couple of them.

Thanks a lot for the references!  I'll keep them at hand.

(And yes, I do agree that not everything should be a monad :-) )

--
Sergiu

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.


_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probabilistic programming in Haskell with bali-phy

Sergiu Ivanov-2
Thus quoth  Alexander Kjeldaas  at 18:42 on Thu, Jun 15 2017:
>
> I guess https://github.com/adscib/monad-bayes is relevant as well.

Noted, thanks a lot.

--
Sergiu

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

signature.asc (497 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probabilistic programming in Haskell with bali-phy

Jacques Carette
In reply to this post by Alexander Kjeldaas
While we're mentioning Haskell-embedded languages for probabilistic
programming, there is yet another, Hakaru.

github: https://github.com/hakaru-dev/hakaru
docs: https://hakaru-dev.github.io/
hackage: https://hackage.haskell.org/package/hakaru-0.4.0

It can be used either embedded or via an external syntax.  It can act as
a sampler, but also do code generation (to Haskell, to C, more coming),
simplification (via Maple if it is installed) and disintegration (aka
conditioning).

It uses quite a number of advanced Haskell features (though works in 7.8
onwards) to insure safety of the embedded language.  See
https://hackage.haskell.org/package/hakaru-0.4.0/docs/Language-Hakaru-Syntax-ABT.html 
if you are curious about that.

Jacques
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probabilistic programming in Haskell with bali-phy

Sergiu Ivanov-2
Hello Jacques,

Thus quoth  Jacques Carette  at 13:57 on Sun, Jun 18 2017:
>
> While we're mentioning Haskell-embedded languages for probabilistic
> programming, there is yet another, Hakaru.
>
> github: https://github.com/hakaru-dev/hakaru
> docs: https://hakaru-dev.github.io/
> hackage: https://hackage.haskell.org/package/hakaru-0.4.0

Thanks for the reference!

To my inexperienced eye, this offers somewhat similar functionality to
Benjamin's library (the original poster).

> It can be used either embedded or via an external syntax.  It can act as
> a sampler, but also do code generation (to Haskell, to C, more coming),
> simplification (via Maple if it is installed) and disintegration (aka
> conditioning).

Sounds pretty impressive, I'll keep the reference in mind.

--
Sergiu

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

signature.asc (497 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Probabilistic programming in Haskell with bali-phy

Dominic Steinitz-2
In reply to this post by oleg-30

While we're mentioning Haskell-embedded languages for probabilistic
programming, there is yet another, Hakaru.

github: https://github.com/hakaru-dev/hakaru
docs: https://hakaru-dev.github.io/
hackage: https://hackage.haskell.org/package/hakaru-0.4.0

It can be used either embedded or via an external syntax.  It can act as
a sampler, but also do code generation (to Haskell, to C, more coming),
simplification (via Maple if it is installed) and disintegration (aka
conditioning).

It uses quite a number of advanced Haskell features (though works in 7.8
onwards) to insure safety of the embedded language.  See
https://hackage.haskell.org/package/hakaru-0.4.0/docs/Language-Hakaru-Syntax-ABT.html
if you are curious about that.

Jacques

There are production strength PPLs like Stan and PyMC3. They aren’t Haskell but if you actually want to model something then they are my “go to” tools. There’s also LibBI which uses Sequential Monte Carlo rather than Hamiltonian Monte Carlo. Stan and LibBI are C++ with interfaces (I use the word very loosely) from e.g. R, Python, Matlab, etc. PyMC3 as you might guess is entirely Python. Both have very good communities.

In Haskell there is also monad-bayes https://github.com/adscib/monad-bayes and baysig, the latter sadly not publicly available (last time I checked). If you have a hidden state model (e.g. stochastic volatility) then there is also particle filtering (aka Sequential Monte Carlo) using https://hackage.haskell.org/package/kalman-1.0.0.2.

I just looked at the commit log for monad-bayes and it seems to use HMC these days :) and supports ADVI.

I spent a bit of time at the recent Zurihac with Alexander Vershilov making some very small steps towards a symplectic integrator package which could form the basis for HMC in Haskell.



_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.
Loading...