# Probabilistic Programming

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

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

**Page:** 8

---

## [Conjugate inference](https://discourse.julialang.org/t/conjugate-inference/84536)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 4\
**Last updated:** [July 20, 2022, 5:14pm UTC](https://discourse.julialang.org/t/conjugate-inference/84536 "2022-07-20T17:14:22Z")

</div>

Is there a package that analytically and automatically computers posteriors based on conjugate priors? I found GitHub - JuliaStats/ConjugatePriors.jl: A Julia package to support conjugate prior distributions. and the na…

---

## [Specifying model with threshold / ifelse likelihood in Turing / Soss / Tilde](https://discourse.julialang.org/t/specifying-model-with-threshold-ifelse-likelihood-in-turing-soss-tilde/83473)

<div class="topic-metadata">

**Author:** [@Jakob](https://discourse.julialang.org/u/Jakob)\
**Replies:** 5\
**Last updated:** [July 17, 2022, 8:31pm UTC](https://discourse.julialang.org/t/specifying-model-with-threshold-ifelse-likelihood-in-turing-soss-tilde/83473 "2022-07-17T20:31:20Z")

</div>

Hi everyone, I have a model which is a simplified version of the one presented in Mulder & Hoff (2021) and looks something like this: \\begin{align} \\mathbf{z}\_{i} &\\sim \\textrm{MvNormal}(\\boldsymbol{\\theta}\_{i},\\math…

---

## [New Bayesian Statistics tutorials with Turing](https://discourse.julialang.org/t/new-bayesian-statistics-tutorials-with-turing/60825)

<div class="topic-metadata">

**Author:** [@Storopoli](https://discourse.julialang.org/u/Storopoli)\
**Replies:** 25\
**Last updated:** [July 15, 2022, 5:56am UTC](https://discourse.julialang.org/t/new-bayesian-statistics-tutorials-with-turing/60825 "2022-07-15T05:56:49Z")

</div>

I’ve just made some Bayesian Statistics tutorials using Julia and Turing. The content is fully opensourced in GitHub and has a very permissive Creative Commons License (which means you can copy and alter the crap out it……

---

## [Parameter estimation problem in Turing](https://discourse.julialang.org/t/parameter-estimation-problem-in-turing/84147)

<div class="topic-metadata">

**Author:** [@Jian\_ZUO](https://discourse.julialang.org/u/Jian_ZUO)\
**Replies:** 11\
**Last updated:** [July 14, 2022, 10:16am UTC](https://discourse.julialang.org/t/parameter-estimation-problem-in-turing/84147 "2022-07-14T10:16:35Z")

</div>

Hi, I am new to Turing PPL. I have a random variable X which is Gamma distributed, i.e., X ~Ga(α, β). And the scale β parameter of X is also obeys a Gamma law, namely, β ~ Ga(α0, β0). Then I want to infer the above par…

---

## [Understanding Gen.jl overhead](https://discourse.julialang.org/t/understanding-gen-jl-overhead/76761)

<div class="topic-metadata">

**Author:** [@ptotolo](https://discourse.julialang.org/u/ptotolo)\
**Replies:** 2\
**Last updated:** [July 10, 2022, 2:37pm UTC](https://discourse.julialang.org/t/understanding-gen-jl-overhead/76761 "2022-07-10T14:37:00Z")

</div>

I’ve been playing around with Gen.jl for a couple of weeks and one of the things I did was compare its performance to a hand-coded model in order to measure the overhead of the underlying trace data structure, the dynami…

---

## [Turing GLM error when trying to use ReverseDiff as the AD backend](https://discourse.julialang.org/t/turing-glm-error-when-trying-to-use-reversediff-as-the-ad-backend/83803)

<div class="topic-metadata">

**Author:** [@sree\_datta](https://discourse.julialang.org/u/sree_datta)\
**Replies:** 0\
**Last updated:** [July 5, 2022, 10:07pm UTC](https://discourse.julialang.org/t/turing-glm-error-when-trying-to-use-reversediff-as-the-ad-backend/83803 "2022-07-05T22:07:20Z")

</div>

@Storopoli @devmotion @torfjelde Working with the same data set where we were discussing the use of ReverseDiff for a more efficient and faster sampling, I tried to run the same model using TuringGLM and its’ formulaic …

---

## [Issue with for-loop free model](https://discourse.julialang.org/t/issue-with-for-loop-free-model/83468)

<div class="topic-metadata">

**Author:** [@spragud2](https://discourse.julialang.org/u/spragud2)\
**Replies:** 1\
**Last updated:** [June 28, 2022, 5:08pm UTC](https://discourse.julialang.org/t/issue-with-for-loop-free-model/83468 "2022-06-28T17:08:49Z")

</div>

Hi All, I’m trying to get a simple MLP trained. Pretty much all turing tutorials still use for i in 1:N loops for the likelihood on the data. I’m trying the following: using Flux using Turing,Zygote using MCMCChains …

---

## [Turing probability queries always return 1](https://discourse.julialang.org/t/turing-probability-queries-always-return-1/83269)

<div class="topic-metadata">

**Author:** [@cmhainje](https://discourse.julialang.org/u/cmhainje)\
**Replies:** 0\
**Last updated:** [June 23, 2022, 6:49pm UTC](https://discourse.julialang.org/t/turing-probability-queries-always-return-1/83269 "2022-06-23T18:49:24Z")

</div>

I made a probabilistic model that attempts to infer the center coordinates (h, k) and radius (R) of a circle given a number of points that were sampled from the circle, but when I try to query probabilities, I always get…

---

## [Turing and DifferentialEquations: TypeError expected Float64, got ForwardDiff](https://discourse.julialang.org/t/turing-and-differentialequations-typeerror-expected-float64-got-forwarddiff/82194)

<div class="topic-metadata">

**Author:** [@finn](https://discourse.julialang.org/u/finn)\
**Replies:** 4\
**Last updated:** [June 23, 2022, 9:31am UTC](https://discourse.julialang.org/t/turing-and-differentialequations-typeerror-expected-float64-got-forwarddiff/82194 "2022-06-23T09:31:41Z")

</div>

Hi all, I am trying to use DifferentialEquations.jl and Turing.jl to perform parameter estimation using MCMC. I am currently getting the error TypeError: in typeassert, expected Float64, got a value of type ForwardDi…

---

## [Feedback request: \`rand\` and \`predict\` semantics](https://discourse.julialang.org/t/feedback-request-rand-and-predict-semantics/82977)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 7\
**Last updated:** [June 19, 2022, 1:12pm UTC](https://discourse.julialang.org/t/feedback-request-rand-and-predict-semantics/82977 "2022-06-19T13:12:03Z")

</div>

Hi, I’m working on Tilde.jl, and thinking some more about how rand and predict should be set up. In current development, this works: julia\> m = @model n begin μ ~ Normal(σ=10) σ ~ Exponential() …

---

## [Errors in inference in upgraded Julia version (1.6.3 vs. 1.7.3)](https://discourse.julialang.org/t/errors-in-inference-in-upgraded-julia-version-1-6-3-vs-1-7-3/82668)

<div class="topic-metadata">

**Author:** [@vembha](https://discourse.julialang.org/u/vembha)\
**Replies:** 6\
**Last updated:** [June 14, 2022, 8:03am UTC](https://discourse.julialang.org/t/errors-in-inference-in-upgraded-julia-version-1-6-3-vs-1-7-3/82668 "2022-06-14T08:03:12Z")

</div>

Hello, I’ve been running a parallelized (4 chains) Bayesian inference code using the NUTS sampler on Julia v1.6.3 (Cent OS - HPC cluster) and was getting results as expected and without any warning during inference. I’v…

---

## [Simple linear regression with ReactiveMP - RuleMethodError?](https://discourse.julialang.org/t/simple-linear-regression-with-reactivemp-rulemethoderror/81526)

<div class="topic-metadata">

**Author:** [@svilupp](https://discourse.julialang.org/u/svilupp)\
**Replies:** 5\
**Last updated:** [June 13, 2022, 2:12pm UTC](https://discourse.julialang.org/t/simple-linear-regression-with-reactivemp-rulemethoderror/81526 "2022-06-13T14:12:18Z")

</div>

I’ve tried to implement a simple linear regression with Normal obs. model, so effectively a combination of examples: Linear Regression and Univariate Normal Mixture When I define both RVs for location and scale of the o…

---

## [Speed up Gaussian Process model](https://discourse.julialang.org/t/speed-up-gaussian-process-model/82315)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 16\
**Last updated:** [June 9, 2022, 7:43pm UTC](https://discourse.julialang.org/t/speed-up-gaussian-process-model/82315 "2022-06-09T19:43:42Z")

</div>

Hi all I am interested in implementing a latent variable Gaussian process regression model with a pre-calculated (phylogenetic) distance matrix. The below model (mostly copied from here and based on this runs, and get’s…

---

## [\[ANN\] ZigZagBoomerang.jl](https://discourse.julialang.org/t/ann-zigzagboomerang-jl/57287)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 37\
**Last updated:** [June 3, 2022, 6:53pm UTC](https://discourse.julialang.org/t/ann-zigzagboomerang-jl/57287 "2022-06-03T18:53:41Z")

</div>

Dear all! We would like to announce our package together with our new paper “Sticky PDMP samplers for sparse and local inference problems” (Arxiv link) ZigZagBoomerang.jl Sleek implementations of the ZigZag, Boomerang …

---

## [Fast/Approximate Sampling for HMMs/HDP-HMMs](https://discourse.julialang.org/t/fast-approximate-sampling-for-hmms-hdp-hmms/68591)

<div class="topic-metadata">

**Author:** [@spragud2](https://discourse.julialang.org/u/spragud2)\
**Replies:** 5\
**Last updated:** [June 3, 2022, 7:55am UTC](https://discourse.julialang.org/t/fast-approximate-sampling-for-hmms-hdp-hmms/68591 "2022-06-03T07:55:37Z")

</div>

Hi All, First post here. I’m interested in building some tools based off bayesian hidden Markov models. Indeed, what I would really like as a project for myself is a Julia equivalent to the PYHSMM library which is a fan…

---

## [A simple model which I can't get Turing to fit to simulated data](https://discourse.julialang.org/t/a-simple-model-which-i-cant-get-turing-to-fit-to-simulated-data/81572)

<div class="topic-metadata">

**Author:** [@lgrozinger](https://discourse.julialang.org/u/lgrozinger)\
**Replies:** 1\
**Last updated:** [May 24, 2022, 11:12am UTC](https://discourse.julialang.org/t/a-simple-model-which-i-cant-get-turing-to-fit-to-simulated-data/81572 "2022-05-24T11:12:58Z")

</div>

Having just started with Turing, I am unable to understand why this model does not produce good results. using Turing using MCMCChains λ = Normal(0, 1) data = rand.(Poisson.(exp.(rand(λ, 2^16)))) @model function m(y, …

---

## [Easier use of generated\_quantities](https://discourse.julialang.org/t/easier-use-of-generated-quantities/81305)

<div class="topic-metadata">

**Author:** [@wc4wc4wc4](https://discourse.julialang.org/u/wc4wc4wc4)\
**Replies:** 0\
**Last updated:** [May 19, 2022, 10:17am UTC](https://discourse.julialang.org/t/easier-use-of-generated-quantities/81305 "2022-05-19T10:17:40Z")

</div>

Hi, I’ve had a problem where I had to deal with generated\_quantities and I’ve come up with a solution myself, but I pretty sure that it’s not the optimal way of doing it. No matter what, I think it would be a great help…

---

## [Bivariate normal in Turing](https://discourse.julialang.org/t/bivariate-normal-in-turing/53446)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 5\
**Last updated:** [May 18, 2022, 10:07pm UTC](https://discourse.julialang.org/t/bivariate-normal-in-turing/53446 "2022-05-18T22:07:23Z")

</div>

I’m just starting to get to grips with Turing, and enjoying it very much so far. But I’ve run up against a problem with a bivariate normal prior. using Turing, StatsPlots @model function pearson\_correlation(x) rows…

---

## [NUTS speed is very slow for high dimension parameter inference in Turing.jl](https://discourse.julialang.org/t/nuts-speed-is-very-slow-for-high-dimension-parameter-inference-in-turing-jl/80349)

<div class="topic-metadata">

**Author:** [@zqn](https://discourse.julialang.org/u/zqn)\
**Replies:** 8\
**Last updated:** [May 13, 2022, 4:38am UTC](https://discourse.julialang.org/t/nuts-speed-is-very-slow-for-high-dimension-parameter-inference-in-turing-jl/80349 "2022-05-13T04:38:46Z")

</div>

Hi, I’m trying Turing.jl for a high dimension hyperparameter inference problem, and here’s a toy example. To estimate tureE using fake testx and testy, I’m using a NUTS which costs no less than 5 hours according to the p…

---

## [Is this possible to do with Turing?](https://discourse.julialang.org/t/is-this-possible-to-do-with-turing/80742)

<div class="topic-metadata">

**Author:** [@donk\_fish](https://discourse.julialang.org/u/donk_fish)\
**Replies:** 0\
**Last updated:** [May 9, 2022, 9:20am UTC](https://discourse.julialang.org/t/is-this-possible-to-do-with-turing/80742 "2022-05-09T09:20:19Z")

</div>

Hi, Imagine I have two models, for simplicity say an AR(1) model and a MA(1) model. I want to construct and sample from a composition of their likelihoods, i.e. a geometric average, where the weight themselves is a par…

---

## [The Bayesian SDE in the Turing tutorial issues an error](https://discourse.julialang.org/t/the-bayesian-sde-in-the-turing-tutorial-issues-an-error/73447)

<div class="topic-metadata">

**Author:** [@lilianping](https://discourse.julialang.org/u/lilianping)\
**Replies:** 21\
**Last updated:** [May 3, 2022, 7:41am UTC](https://discourse.julialang.org/t/the-bayesian-sde-in-the-turing-tutorial-issues-an-error/73447 "2022-05-03T07:41:43Z")

</div>

When I tried to run the code in the Turing tutorial, the following error occurred when running to beyesianSDE, why is it?

---

## [Turing: censored regression example](https://discourse.julialang.org/t/turing-censored-regression-example/53837)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 9\
**Last updated:** [April 30, 2022, 3:07pm UTC](https://discourse.julialang.org/t/turing-censored-regression-example/53837 "2022-04-30T15:07:28Z")

</div>

Building upon my previous example of truncated regression, I thought I’d do a worked example of censored regression. To clarify, censoring is where observations below a lower bound and/or observations above an upper boun…

---

## [There is an error in tutorials about the Variational inference](https://discourse.julialang.org/t/there-is-an-error-in-tutorials-about-the-variational-inference/79975)

<div class="topic-metadata">

**Author:** [@huangruiping9](https://discourse.julialang.org/u/huangruiping9)\
**Replies:** 1\
**Last updated:** [April 26, 2022, 2:45pm UTC](https://discourse.julialang.org/t/there-is-an-error-in-tutorials-about-the-variational-inference/79975 "2022-04-26T14:45:16Z")

</div>

Variational inference (VI) in Turing.jl Copy-paste from 5. Linear regression¶ “remove\_names = filter(x-\>!in(x, \[:MPG, :Model\]), names(data))” has an error should be replace by “remove\_names = filter(x-\>!in(x, \[“MPG”…

---

## [Turing.jl coin flipping example with large number of data points](https://discourse.julialang.org/t/turing-jl-coin-flipping-example-with-large-number-of-data-points/33049)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 4\
**Last updated:** [April 26, 2022, 9:47am UTC](https://discourse.julialang.org/t/turing-jl-coin-flipping-example-with-large-number-of-data-points/33049 "2022-04-26T09:47:41Z")

</div>

Please forgive my naïveté (I don’t have any formal training in probabilistic programming/Bayesian statistics) but I’m trying to understand something about the coin flipping example in the Turing.jl docs. Here’s a bare-b…

---

## [Multiplication of Categoricals in ForneyLab](https://discourse.julialang.org/t/multiplication-of-categoricals-in-forneylab/79894)

<div class="topic-metadata">

**Author:** [@erlebach](https://discourse.julialang.org/u/erlebach)\
**Replies:** 0\
**Last updated:** [April 23, 2022, 2:09pm UTC](https://discourse.julialang.org/t/multiplication-of-categoricals-in-forneylab/79894 "2022-04-23T14:09:29Z")

</div>

I am trying to implement the skill modeling in Chapter 2 of Model-based machine learning by Winn and Bishop. In the course of the model, I create a factor node that is the product of two categoricals. I found out that th…

---

## [Turing Guide documentation: prob"..." examples throws errors](https://discourse.julialang.org/t/turing-guide-documentation-prob-examples-throws-errors/50319)

<div class="topic-metadata">

**Author:** [@Hakan\_Kjellerstrand](https://discourse.julialang.org/u/Hakan_Kjellerstrand)\
**Replies:** 4\
**Last updated:** [April 21, 2022, 7:18pm UTC](https://discourse.julialang.org/t/turing-guide-documentation-prob-examples-throws-errors/50319 "2022-04-21T19:18:00Z")

</div>

I’m new to Turing.jl (and quite new to Julia as well) and reading the Guide documentation ( Guide ), section “Querying Probabilities from Model or Chain”. The probability query examples are of the form prob"x = 1.0, y =…

---

## [Bayesian regression with parametrized basis functions in Turing.jl](https://discourse.julialang.org/t/bayesian-regression-with-parametrized-basis-functions-in-turing-jl/71725)

<div class="topic-metadata">

**Author:** [@mvsoom](https://discourse.julialang.org/u/mvsoom)\
**Replies:** 7\
**Last updated:** [April 19, 2022, 5:55pm UTC](https://discourse.julialang.org/t/bayesian-regression-with-parametrized-basis-functions-in-turing-jl/71725 "2022-04-19T17:55:14Z")

</div>

I’m trying to migrate a simple Bayesian model handwritten in Python to Turing.jl for a more modern approach. The model is a classical parametrized basis function expansion: a 1D (speech) signal f(t) is expanded into par…

---

## [Use of intermediate variables to condition likelihood](https://discourse.julialang.org/t/use-of-intermediate-variables-to-condition-likelihood/78313)

<div class="topic-metadata">

**Author:** [@3mtmuhPnQv](https://discourse.julialang.org/u/3mtmuhPnQv)\
**Replies:** 1\
**Last updated:** [April 19, 2022, 8:58am UTC](https://discourse.julialang.org/t/use-of-intermediate-variables-to-condition-likelihood/78313 "2022-04-19T08:58:18Z")

</div>

I’d like to model prices as following a kind of stochastic difference equation, where jumps from one time step to the next follow p\_{t} = p\_{t - 1} + c \\exp(- b t\_0) \\Delta t + X(t) X ~ \\text{student\_t}(3, 0, \\sqrt{\\De…

---

## [Turing.jl identical likelihood but different \`MAP()\` result?](https://discourse.julialang.org/t/turing-jl-identical-likelihood-but-different-map-result/79671)

<div class="topic-metadata">

**Author:** [@jling](https://discourse.julialang.org/u/jling)\
**Replies:** 0\
**Last updated:** [April 19, 2022, 3:09am UTC](https://discourse.julialang.org/t/turing-jl-identical-likelihood-but-different-map-result/79671 "2022-04-19T03:09:58Z")

</div>

sample script: https://gist.github.com/Moelf/ab2f10ce45873bb91eaec60ace8388c0 you will need \]dev https://github.com/JuliaHEP/LiteHF.jl \]add Turing, Optim to compare, flip this line: https://github.com/JuliaHEP/LiteH…

---

## [Empirical density contours from an MCMC sample](https://discourse.julialang.org/t/empirical-density-contours-from-an-mcmc-sample/78629)

<div class="topic-metadata">

**Author:** [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Replies:** 2\
**Last updated:** [March 29, 2022, 11:52am UTC](https://discourse.julialang.org/t/empirical-density-contours-from-an-mcmc-sample/78629 "2022-03-29T11:52:42Z")

</div>

I have a recollection of seeing two-dimensional empirical density contours from an MCMC (Markov-chain Monte Carlo) sample but I didn’t record the information on the package. Was I remembering correctly and, if so, could…

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

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