3 ms·
I know nothing about the probabilistic programming, but would not it be easier (and more applicable) to have a library with relevant functionality and a bunch o
by ptero 10y ago
I know nothing about the probabilistic programming, but would not it be easier (and more applicable) to have a library with relevant functionality and a bunch of interfaces for Go/C/Python/... than to implement a new language? An honest question.
- jbpetersen 10y agoExample from another comment here: http://dippl.org/chapters/02-webppl.html http://dippl.org/chapters/02-webppl.html
- glassx 10y agoIt seems that their definition of "language" encompasses more than general-purpose PLs and includes DSLs, libraries and code-generators. In their list there are libraries for Scala, .NET, Python, C, OCaml and Javascript.
- ppcsf 10y agoI developed a PPL within C#, which I guess has a more familiar syntax for a lot of people. Basically, PPLs allow you to treat entire probabilistic models as primitives, and combine them as easily as we add integers. Let's say we have two models describing the distribution of university grades in America and India, and we want to combine them into a single model, where you have a 25% chance of being an American, and a 75% chance of being an Indian: var combined = from isAmerican in Bernoulli(0.25) from grade in isAmerican ? americanGrades : indianGrades select grade; This is now a new model that can be composed further with other models. Building models like this feels very expressive. The inference method is also completely decoupled from the model specification process, allowing us to perform a Sequential Monte Carlo just by writing: var smcResults = combined.SmcMultiple(100); or var pimhResults = combined.Pimh(10); for a Particle-Independant Metropolis-Hastings. There's more examples here: https://github.com/joashc/csharp-probability-monad https://github.com/joashc/csharp-probability-monad