# Probabilistic Programming

**URL:** https://discourse.julialang.org/c/domain/probprog/48.md?page=15

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

**Page:** 16

---

## [Custom univariate distribution in Turing.jl](https://discourse.julialang.org/t/custom-univariate-distribution-in-turing-jl/38874)

<div class="topic-metadata">

**Author:** [@SSU](https://discourse.julialang.org/u/SSU)\
**Replies:** 4\
**Last updated:** [May 6, 2020, 10:58am UTC](https://discourse.julialang.org/t/custom-univariate-distribution-in-turing-jl/38874 "2020-05-06T10:58:41Z")

</div>

I’m trying to use customized univariate distribution in Turing.jl. (The domain is 0 ~ +Inf) I implemented Distributions.pdf, logpdf, rand, minimum, maximum etc, referring the document (Advanced Usage). I’m pretty sure…

---

## [Sampling from Delta in Turing](https://discourse.julialang.org/t/sampling-from-delta-in-turing/38577)

<div class="topic-metadata">

**Author:** [@trahflow](https://discourse.julialang.org/u/trahflow)\
**Replies:** 8\
**Last updated:** [May 2, 2020, 1:55pm UTC](https://discourse.julialang.org/t/sampling-from-delta-in-turing/38577 "2020-05-02T13:55:21Z")

</div>

Hi PPL people :slight\_smile: I was trying to build a very simple model of censored sales, and was naively trying: @model mymodel(sales) = begin lam ~ Gamma(2, 3) stocks ~ Categorical(ones(20) ./ 20) demand …

---

## [Benchmarking of PPL](https://discourse.julialang.org/t/benchmarking-of-ppl/37850)

<div class="topic-metadata">

**Author:** [@mystis](https://discourse.julialang.org/u/mystis)\
**Replies:** 4\
**Last updated:** [April 21, 2020, 8:23pm UTC](https://discourse.julialang.org/t/benchmarking-of-ppl/37850 "2020-04-21T20:23:30Z")

</div>

Hi all, I’ve seen the perf benchmark or sampling for Turing vs Stan but I was wondering if we have benchmarks for Pyro, pymc3, tensorflow-probabiliy with one chain and with multiple chains (since tfp seems to benefit fro…

---

## [Unable to fit example Turing model](https://discourse.julialang.org/t/unable-to-fit-example-turing-model/37764)

<div class="topic-metadata">

**Author:** [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Replies:** 1\
**Last updated:** [April 17, 2020, 2:49pm UTC](https://discourse.julialang.org/t/unable-to-fit-example-turing-model/37764 "2020-04-17T14:49:43Z")

</div>

The following code, copied from the Turing website throws an error using Turing using StatsPlots # Define a simple Normal model with unknown mean and variance. @model gdemo(x, y) = begin s ~ InverseGamma(2, 3) m ~ …

---

## [Why do chains not converge in BNN](https://discourse.julialang.org/t/why-do-chains-not-converge-in-bnn/37730)

<div class="topic-metadata">

**Author:** [@Farlein](https://discourse.julialang.org/u/Farlein)\
**Replies:** 3\
**Last updated:** [April 17, 2020, 1:09pm UTC](https://discourse.julialang.org/t/why-do-chains-not-converge-in-bnn/37730 "2020-04-17T13:09:49Z")

</div>

Hi there, I continue to learn Turing. In the tutorial for Bayesian Logistic Regression (https://turing.ml/dev/tutorials/2-logisticregression/), there is a section to check the trend plots of the chains, in order to “do …

---

## [Turing.jl - Binomial ArgumentError zero(p) \<= p \<= one(p) is not satisfied](https://discourse.julialang.org/t/turing-jl-binomial-argumenterror-zero-p-p-one-p-is-not-satisfied/37601)

<div class="topic-metadata">

**Author:** [@mangulo](https://discourse.julialang.org/u/mangulo)\
**Replies:** 9\
**Last updated:** [April 17, 2020, 2:26am UTC](https://discourse.julialang.org/t/turing-jl-binomial-argumenterror-zero-p-p-one-p-is-not-satisfied/37601 "2020-04-17T02:26:33Z")

</div>

Hi All, This is my first post in Julia discourse! I have been trying to do parameter inference in a classical Susceptible-Infected-Recovered epidemic model using Turing. I am finding a strange error: the program correc…

---

## [Minijyro - a toy Pyro-like PPL](https://discourse.julialang.org/t/minijyro-a-toy-pyro-like-ppl/37356)

<div class="topic-metadata">

**Author:** [@treichelt](https://discourse.julialang.org/u/treichelt)\
**Replies:** 5\
**Last updated:** [April 12, 2020, 1:00am UTC](https://discourse.julialang.org/t/minijyro-a-toy-pyro-like-ppl/37356 "2020-04-12T01:00:56Z")

</div>

Hi everyone, I implemented a small PPL, Minijyro.jl, that is based on the ideas of effect handlers in Pyro and thought it might be of interest to people. This project is mostly me trying to learn more about Julia and pr…

---

## [Issues Importing Turing Linux](https://discourse.julialang.org/t/issues-importing-turing-linux/37132)

<div class="topic-metadata">

**Author:** [@nucklass](https://discourse.julialang.org/u/nucklass)\
**Replies:** 4\
**Last updated:** [April 8, 2020, 7:25pm UTC](https://discourse.julialang.org/t/issues-importing-turing-linux/37132 "2020-04-08T19:25:33Z")

</div>

New to Linux but familiar (enough) with Turing. Having an issue get Turing to run on Ubuntu. I’ve been able to run Turing in windows, but getting some errors I’ve never seen before now. Currently running Julia 1.4.0. Her…

---

## [PPL collaboration](https://discourse.julialang.org/t/ppl-collaboration/26145)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 33\
**Last updated:** [April 8, 2020, 3:06pm UTC](https://discourse.julialang.org/t/ppl-collaboration/26145 "2020-04-08T15:06:35Z")

</div>

@mohamed82008 opened this issue on @Elrod’s ProbabilityModels.jl library, closing with Finally, would you be interested in joining forces? There’s some good discussion here, but it drifted a bit from anything specifi…

---

## [SIR modeling in Soss](https://discourse.julialang.org/t/sir-modeling-in-soss/36680)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 16\
**Last updated:** [April 5, 2020, 3:31pm UTC](https://discourse.julialang.org/t/sir-modeling-in-soss/36680 "2020-04-05T15:31:10Z")

</div>

I spent some time yesterday getting as SIR epidemiology model working in Soss. I see this a lot as a differential equation, but that doesn’t make sense for real data, because what we really observe are counts. So I used …

---

## [Extended Slack PPL discussion](https://discourse.julialang.org/t/extended-slack-ppl-discussion/36623)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 5\
**Last updated:** [March 28, 2020, 5:25pm UTC](https://discourse.julialang.org/t/extended-slack-ppl-discussion/36623 "2020-03-28T17:25:51Z")

</div>

Hi, there was a nice thread today on the Julia Slack PPL channel. Because it’s the free version, this will scroll into oblivion, so I thought I’d capture it for reference and in case it’s useful to anyone else: I had …

---

## [\[ANN\] Turing.jl 0.10.0](https://discourse.julialang.org/t/ann-turing-jl-0-10-0/36507)

<div class="topic-metadata">

**Author:** [@cpfiffer](https://discourse.julialang.org/u/cpfiffer)\
**Replies:** 0\
**Last updated:** [March 25, 2020, 6:29pm UTC](https://discourse.julialang.org/t/ann-turing-jl-0-10-0/36507 "2020-03-25T18:29:02Z")

</div>

Hey folks. We’re happy to announce Turing version 0.10.0! We’re now maintaining a HISTORY.md file with an in-depth summary of changes, but I wanted to give an overview of the biggest features that you can use in 0.10.0. …

---

## [\[ANN\] Turing 0.9.0](https://discourse.julialang.org/t/ann-turing-0-9-0/35102)

<div class="topic-metadata">

**Author:** [@cpfiffer](https://discourse.julialang.org/u/cpfiffer)\
**Replies:** 6\
**Last updated:** [February 26, 2020, 8:57pm UTC](https://discourse.julialang.org/t/ann-turing-0-9-0/35102 "2020-02-26T20:57:38Z")

</div>

Turing 0.9 has been released. Bugs have been fixed and we’ve got new features and some key performance improvements. Precompilation and using Turing time should be dramatically improved. Informal benchmarks suggest that…

---

## [Turing.jl - update variables within the model](https://discourse.julialang.org/t/turing-jl-update-variables-within-the-model/35168)

<div class="topic-metadata">

**Author:** [@tpoisot](https://discourse.julialang.org/u/tpoisot)\
**Replies:** 3\
**Last updated:** [February 26, 2020, 2:41pm UTC](https://discourse.julialang.org/t/turing-jl-update-variables-within-the-model/35168 "2020-02-26T14:41:58Z")

</div>

I’m using Turing to fit a model, where every data point is a pair (S,L), as we describe in the following paper: Revisiting the links-species scaling relationship in food webs | bioRxiv In practice, we do not use L to fi…

---

## [TypeError using ODEs in Turing.jl](https://discourse.julialang.org/t/typeerror-using-odes-in-turing-jl/34857)

<div class="topic-metadata">

**Author:** [@virgile-baudrot](https://discourse.julialang.org/u/virgile-baudrot)\
**Replies:** 2\
**Last updated:** [February 19, 2020, 8:33pm UTC](https://discourse.julialang.org/t/typeerror-using-odes-in-turing-jl/34857 "2020-02-19T20:33:27Z")

</div>

Hi all, I try using ODEs within Turing model, but I have the following error: TypeError: in typeassert, expected Float64, got ForwardDiff.Dual{Nothing,Float64,1} Here is my code: function myODE(du,u,p,t) du\[1\] = …

---

## [Choosing a binary value with a certain probability (Biased random generator)](https://discourse.julialang.org/t/choosing-a-binary-value-with-a-certain-probability-biased-random-generator/34141)

<div class="topic-metadata">

**Author:** [@HoldenCaulfield](https://discourse.julialang.org/u/HoldenCaulfield)\
**Replies:** 4\
**Last updated:** [February 4, 2020, 2:46pm UTC](https://discourse.julialang.org/t/choosing-a-binary-value-with-a-certain-probability-biased-random-generator/34141 "2020-02-04T14:46:49Z")

</div>

I want to determine a random binary variable according to its probability. So let’s say that I have a binary variable with a probability of 70%, so I want it to become 1 with the probability of 70% and zero with a probab…

---

## [Sampling from posterior predictive distribution](https://discourse.julialang.org/t/sampling-from-posterior-predictive-distribution/32738)

<div class="topic-metadata">

**Author:** [@kirtsar](https://discourse.julialang.org/u/kirtsar)\
**Replies:** 3\
**Last updated:** [December 27, 2019, 4:32pm UTC](https://discourse.julialang.org/t/sampling-from-posterior-predictive-distribution/32738 "2019-12-27T16:32:38Z")

</div>

I’m completely new to Bayesian Inference stuff, now I’m reading “Statistical Rethinking” book chap. 3. There is a concept of “posterior predictive distribution” when I take the “sum” of weighted distributions according t…

---

## [Advice for simple (mildly large) Turing model](https://discourse.julialang.org/t/advice-for-simple-mildly-large-turing-model/32719)

<div class="topic-metadata">

**Author:** [@opera\_malenky](https://discourse.julialang.org/u/opera_malenky)\
**Replies:** 9\
**Last updated:** [December 26, 2019, 10:00pm UTC](https://discourse.julialang.org/t/advice-for-simple-mildly-large-turing-model/32719 "2019-12-26T22:00:13Z")

</div>

I have a simple Turing model I’ve been trying to implement, but I’ve been running into problems actually running it. I say simple, but my actual problem is not “small”, parameter-wise. I have about 18 groups, with about …

---

## [Issue with BNN example from Turing Tutorial](https://discourse.julialang.org/t/issue-with-bnn-example-from-turing-tutorial/32665)

<div class="topic-metadata">

**Author:** [@nucklass](https://discourse.julialang.org/u/nucklass)\
**Replies:** 3\
**Last updated:** [December 24, 2019, 7:53pm UTC](https://discourse.julialang.org/t/issue-with-bnn-example-from-turing-tutorial/32665 "2019-12-24T19:53:32Z")

</div>

Hi, student and first time poster here. I’ve been trying to work through the tutorials from the Turing documentation, and can’t seem to get the Bayesian Neural Network to run. More specifically, it seems to stem from th…

---

## [Custom likelihood with Turing.jl](https://discourse.julialang.org/t/custom-likelihood-with-turing-jl/31471)

<div class="topic-metadata">

**Author:** [@depasquale](https://discourse.julialang.org/u/depasquale)\
**Replies:** 6\
**Last updated:** [December 7, 2019, 4:34am UTC](https://discourse.julialang.org/t/custom-likelihood-with-turing-jl/31471 "2019-12-07T04:34:53Z")

</div>

Hi all, I’d like to use Turing.jl to sample from a custom likelihood function. I’ve seen this post here and the DynamicHMCexamples.jl package, which gives very nice tutorials for doing this using DynamicHMC, but I would…

---

## [Has anyone taken this course on probabilistic programming in Julia?](https://discourse.julialang.org/t/has-anyone-taken-this-course-on-probabilistic-programming-in-julia/31867)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 6\
**Last updated:** [December 5, 2019, 2:41am UTC](https://discourse.julialang.org/t/has-anyone-taken-this-course-on-probabilistic-programming-in-julia/31867 "2019-12-05T02:41:27Z")

</div>

The course is here: https://www.udemy.com/course/probabilistic-programming-with-python-and-julia/ It has only had 34 students and the ratings are quite poor (so my prior belief about the probability of finding someone …

---

## [Numerical errors in logit normal model using Turing.jl](https://discourse.julialang.org/t/numerical-errors-in-logit-normal-model-using-turing-jl/30602)

<div class="topic-metadata">

**Author:** [@aammd](https://discourse.julialang.org/u/aammd)\
**Replies:** 27\
**Last updated:** [November 9, 2019, 10:06pm UTC](https://discourse.julialang.org/t/numerical-errors-in-logit-normal-model-using-turing-jl/30602 "2019-11-09T22:06:05Z")

</div>

Hello everyone, This is my first post in a Julia forum! I have really been enjoying studying Turing.jl , Gen, and Julia in general. Thank you to all developers! I am trying to fit a simple “logit normal” model, that is…

---

## [Precompiling Turing package failing](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485)

<div class="topic-metadata">

**Author:** [@wattsmo](https://discourse.julialang.org/u/wattsmo)\
**Replies:** 5\
**Last updated:** [November 1, 2019, 7:52am UTC](https://discourse.julialang.org/t/precompiling-turing-package-failing/30485 "2019-11-01T07:52:26Z")

</div>

I have been trying to use the Turing.jl package, MacOS v10.15, I successfully added the package Turing v0.7.0, with dependent packages Zygote v0.3.0, IRTools v0.3.0 but when executing: using Turing I get precompile …

---

## [Soss relating to the broader PPL ecosystem](https://discourse.julialang.org/t/soss-relating-to-the-broader-ppl-ecosystem/29785)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 5\
**Last updated:** [October 16, 2019, 3:47pm UTC](https://discourse.julialang.org/t/soss-relating-to-the-broader-ppl-ecosystem/29785 "2019-10-16T15:47:58Z")

</div>

Hello Julia PPL, I’ve been thinking some more about how Soss might relate to other PPL work. Hope I might get your thoughts on this, and how it might benefit the community as a whole. The big idea is that Soss is proba…

---

## [ERROR: \[Turing\] MH doesn't support vectorizing assume statement](https://discourse.julialang.org/t/error-turing-mh-doesnt-support-vectorizing-assume-statement/29646)

<div class="topic-metadata">

**Author:** [@jdhooghe](https://discourse.julialang.org/u/jdhooghe)\
**Replies:** 4\
**Last updated:** [October 9, 2019, 2:57pm UTC](https://discourse.julialang.org/t/error-turing-mh-doesnt-support-vectorizing-assume-statement/29646 "2019-10-09T14:57:18Z")

</div>

Hello again. I am using Turing to re-create Facebook’s Prophet trend model. My model is: @model Trend(Years, y) = begin NumberOfChangepoints ~ DiscreteUniform(1, 5) s = collect(range(Years\[1\], length=1+NumberO…

---

## [Turing: "no method matching cholenksy"](https://discourse.julialang.org/t/turing-no-method-matching-cholenksy/29287)

<div class="topic-metadata">

**Author:** [@jdhooghe](https://discourse.julialang.org/u/jdhooghe)\
**Replies:** 2\
**Last updated:** [September 29, 2019, 2:30pm UTC](https://discourse.julialang.org/t/turing-no-method-matching-cholenksy/29287 "2019-09-29T14:30:17Z")

</div>

Good morning, I am doing a Bayesian logistic regression with correlated logit regression co-efficients. Here is the model I am working with: ’ Turing.setadbackend(:reverse\_diff) @model BayesLogisticRegression(y, X) =…

---

## [Uncertainty quantification of inverse problem using hierarchical Bayes: high-level modelling](https://discourse.julialang.org/t/uncertainty-quantification-of-inverse-problem-using-hierarchical-bayes-high-level-modelling/28681)

<div class="topic-metadata">

**Author:** [@Oliver\_Lylloff](https://discourse.julialang.org/u/Oliver_Lylloff)\
**Replies:** 12\
**Last updated:** [September 25, 2019, 12:11pm UTC](https://discourse.julialang.org/t/uncertainty-quantification-of-inverse-problem-using-hierarchical-bayes-high-level-modelling/28681 "2019-09-25T12:11:50Z")

</div>

Hi all, I’m trying to solve an example problem from a paper \[1\] and wish to do it with high-level modelling. I’m looking into Turing.jl but other packages may exist that I do not know of. For a didactic purpose I want t…

---

## [Function rand() or sample() for MCMC sampling and similar?](https://discourse.julialang.org/t/function-rand-or-sample-for-mcmc-sampling-and-similar/28985)

<div class="topic-metadata">

**Author:** [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Replies:** 19\
**Last updated:** [September 23, 2019, 3:39pm UTC](https://discourse.julialang.org/t/function-rand-or-sample-for-mcmc-sampling-and-similar/28985 "2019-09-23T15:39:33Z")

</div>

I was wondering whether to use rand() or StatsBase.sample() to name an MCMC sampling function? Some packages (e.g. AdvancedHMC.jl) use sample(), I currently use rand() (BAT.jl). There was a decision on rand() vs sample() …

---

## [PPL connection to MLJ.jl](https://discourse.julialang.org/t/ppl-connection-to-mlj-jl/28736)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 12\
**Last updated:** [September 22, 2019, 9:53pm UTC](https://discourse.julialang.org/t/ppl-connection-to-mlj-jl/28736 "2019-09-22T21:53:11Z")

</div>

I’d like to get Soss.jl connected to MLJ.jl. I can imagine a few ways this might work, and thought I could get some input here on what could be most useful as first steps. I’ll start with a short overview, since Soss wo…

---

## [Packages for Variational Bayes inference? Turing?](https://discourse.julialang.org/t/packages-for-variational-bayes-inference-turing/17904)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 12\
**Last updated:** [September 17, 2019, 2:01pm UTC](https://discourse.julialang.org/t/packages-for-variational-bayes-inference-turing/17904 "2019-09-17T14:01:16Z")

</div>

What is the most versatile and/or fasest Julia package for doing “Variational Bayes inference”? I’ve only found two packages: VarBayes.jl and TopicModelsVB.jl, the former seems deprecated. How can I do Variational Baye…

[Previous page](https://discourse.julialang.org/c/domain/probprog/48.md?page=14)

[Next page](https://discourse.julialang.org/c/domain/probprog/48.md?page=16)
