# Probabilistic Programming

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

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

**Page:** 13

---

## [Sampling from power posterior](https://discourse.julialang.org/t/sampling-from-power-posterior/54924)

<div class="topic-metadata">

**Author:** [@theogf](https://discourse.julialang.org/u/theogf)\
**Replies:** 27\
**Last updated:** [February 12, 2021, 3:10pm UTC](https://discourse.julialang.org/t/sampling-from-power-posterior/54924 "2021-02-12T15:10:09Z")

</div>

Hey, I was wondering if someone could guide me (or direct me to the relevant code) on how to sample from the power posterior given a Turing model. By power posterior, I mean the posterior to modified joint : p(x|y; b) \\…

---

## [Examples of composable probabilistic models](https://discourse.julialang.org/t/examples-of-composable-probabilistic-models/55078)

<div class="topic-metadata">

**Author:** [@jkbest2](https://discourse.julialang.org/u/jkbest2)\
**Replies:** 1\
**Last updated:** [February 11, 2021, 10:54pm UTC](https://discourse.julialang.org/t/examples-of-composable-probabilistic-models/55078 "2021-02-11T22:54:17Z")

</div>

In this thread @cscherrer was looking for examples of where composable probabilistic models would be an advantage: The first case I can see is to provide a library of model components that can be composed. This would b…

---

## [Recursive Bayes](https://discourse.julialang.org/t/recursive-bayes/55036)

<div class="topic-metadata">

**Author:** [@klowrey](https://discourse.julialang.org/u/klowrey)\
**Replies:** 7\
**Last updated:** [February 11, 2021, 5:49pm UTC](https://discourse.julialang.org/t/recursive-bayes/55036 "2021-02-11T17:49:50Z")

</div>

I’m beginning a new project and eager to use Turing.jl or some other PPL for all the benefits, but have not found an example in a recursive Bayes problem setting. That is to say the current posterior is used as a prior w…

---

## [Gaussian Processes with missing data](https://discourse.julialang.org/t/gaussian-processes-with-missing-data/53987)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 11\
**Last updated:** [February 8, 2021, 12:38pm UTC](https://discourse.julialang.org/t/gaussian-processes-with-missing-data/53987 "2021-02-08T12:38:10Z")

</div>

Hi everyone, My data (and data generating process) is probably quite peculiar, but nevertheless me (and my supervisor) are convinced it should be possible to model using probabilistic programming, and we believe Gaussia…

---

## [Vectorising Turing models](https://discourse.julialang.org/t/vectorising-turing-models/54700)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 1\
**Last updated:** [February 5, 2021, 7:49pm UTC](https://discourse.julialang.org/t/vectorising-turing-models/54700 "2021-02-05T19:49:44Z")

</div>

I’m testing out vectorization in Turing models. I’ve managed to get a model that too 195 seconds, down to 60 seconds. But I wonder if there is anything obvious I’m missing in order to get even further benefits? using Tu…

---

## [Composing probabilistic models](https://discourse.julialang.org/t/composing-probabilistic-models/54604)

<div class="topic-metadata">

**Author:** [@plafl](https://discourse.julialang.org/u/plafl)\
**Replies:** 6\
**Last updated:** [February 5, 2021, 4:20pm UTC](https://discourse.julialang.org/t/composing-probabilistic-models/54604 "2021-02-05T16:20:35Z")

</div>

Hi, I’m quite new to Julia and I have stumbled upon Turing. It looks great and the documentation is nice but either I have missed something or simply it’s not possible. I want to define models in a modular way and combi…

---

## [Network ODE Model; Type error with ForwardDiff Dual](https://discourse.julialang.org/t/network-ode-model-type-error-with-forwarddiff-dual/54379)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 9\
**Last updated:** [February 3, 2021, 10:37pm UTC](https://discourse.julialang.org/t/network-ode-model-type-error-with-forwarddiff-dual/54379 "2021-02-03T22:37:59Z")

</div>

Hello, I am new to Turing and trying to use it for my research on network ODE models. I have started with a simple model (network diffusion) \\frac{du}{dt} = - \\rho \\mathbf{L} \\mathbf{u} and am trying to infer the va…

---

## [Is there @code\_warntype output documentation anywhere?](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506)

<div class="topic-metadata">

**Author:** [@zenkavi](https://discourse.julialang.org/u/zenkavi)\
**Replies:** 3\
**Last updated:** [February 3, 2021, 7:41pm UTC](https://discourse.julialang.org/t/is-there-code-warntype-output-documentation-anywhere/54506 "2021-02-03T19:41:35Z")

</div>

Where can I find more information on understanding the output of @code\_warntype mentioned in Turing Performance Tips? I’m trying to use it to debug some ForwardDiff Dual Type errors mentioned often (e.g. one recent exam…

---

## [Issue with MvNormal and Turing](https://discourse.julialang.org/t/issue-with-mvnormal-and-turing/54541)

<div class="topic-metadata">

**Author:** [@Carter](https://discourse.julialang.org/u/Carter)\
**Replies:** 8\
**Last updated:** [February 3, 2021, 7:29pm UTC](https://discourse.julialang.org/t/issue-with-mvnormal-and-turing/54541 "2021-02-03T19:29:07Z")

</div>

I’m trying to recreate the model from chapter 5.1 to estimate correlation from the book Bayesian Cognitive Modeling: A Practical Course using Turing. However, I keep running into an issue with MvNormal where it does not …

---

## [Turing model not optimising; unstable ODE solutions](https://discourse.julialang.org/t/turing-model-not-optimising-unstable-ode-solutions/54526)

<div class="topic-metadata">

**Author:** [@PavanChaggar](https://discourse.julialang.org/u/PavanChaggar)\
**Replies:** 2\
**Last updated:** [February 3, 2021, 1:16pm UTC](https://discourse.julialang.org/t/turing-model-not-optimising-unstable-ode-solutions/54526 "2021-02-03T13:16:47Z")

</div>

Hi, I am getting an integration error with my Turing model. I have searched around but haven’t seen anything similar on discourse. The ODE model is set up as follows: using DifferentialEquations, LightGraphs, Random, …

---

## [Soss updates](https://discourse.julialang.org/t/soss-updates/53362)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 6\
**Last updated:** [January 30, 2021, 4:28pm UTC](https://discourse.julialang.org/t/soss-updates/53362 "2021-01-30T16:28:26Z")

</div>

Hello all, Just thought I’d talk a bit about the latest with Soss. Everything here is from the Soss, MeasureTheory, NestedTuples, and SymbolicCodegen packages. An easy problem Say we have a simple model with some obser…

---

## [Get conditional kernel densities in julia](https://discourse.julialang.org/t/get-conditional-kernel-densities-in-julia/54086)

<div class="topic-metadata">

**Author:** [@claudio20497](https://discourse.julialang.org/u/claudio20497)\
**Replies:** 0\
**Last updated:** [January 27, 2021, 9:53pm UTC](https://discourse.julialang.org/t/get-conditional-kernel-densities-in-julia/54086 "2021-01-27T21:53:55Z")

</div>

Hello, I was wondering if there is a method to get a conditional distribution out of a multivariate kde in julia, preferably using the package KernelDensityEstimate.jl. So say for example that I have the following code…

---

## [Truncated Gaussian Process with AbstractGPs?](https://discourse.julialang.org/t/truncated-gaussian-process-with-abstractgps/53779)

<div class="topic-metadata">

**Author:** [@michielver](https://discourse.julialang.org/u/michielver)\
**Replies:** 4\
**Last updated:** [January 27, 2021, 1:05pm UTC](https://discourse.julialang.org/t/truncated-gaussian-process-with-abstractgps/53779 "2021-01-27T13:05:12Z")

</div>

Hi all, So I have started to work with gaussian process for a time-series model in my case, and I have a variable of interest “score”, which is always between 0 and 4, and varies over time. Now I am using AbstractGPs a…

---

## [Propagating uncertainty of estimated ODE parameters in turing.jl](https://discourse.julialang.org/t/propagating-uncertainty-of-estimated-ode-parameters-in-turing-jl/53718)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 5\
**Last updated:** [January 26, 2021, 11:20pm UTC](https://discourse.julialang.org/t/propagating-uncertainty-of-estimated-ode-parameters-in-turing-jl/53718 "2021-01-26T23:20:30Z")

</div>

Hello all, I have been using turing to estimate parameters of logistic growth curve ODEs, using data from bacterial growth experiments. Since I have replicate growth curves for each treatment, I am interested in the pos…

---

## [Debugging and Visualizing High Dimensional Models (Turing/MCMCChains)](https://discourse.julialang.org/t/debugging-and-visualizing-high-dimensional-models-turing-mcmcchains/41872)

<div class="topic-metadata">

**Author:** [@dlakelan](https://discourse.julialang.org/u/dlakelan)\
**Replies:** 11\
**Last updated:** [January 25, 2021, 10:14pm UTC](https://discourse.julialang.org/t/debugging-and-visualizing-high-dimensional-models-turing-mcmcchains/41872 "2021-01-25T22:14:13Z")

</div>

Hi all. I’m working on a Tutorial in which I use Turing to fit a time series model to some Economic data (nonfarm payrolls). The model is basically a radial basis function expansion, with parameters for center locations…

---

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

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 1\
**Last updated:** [January 23, 2021, 3:12pm UTC](https://discourse.julialang.org/t/turing-truncated-regression-example/53832 "2021-01-23T15:12:58Z")

</div>

Hi all. I’ve found that there are no real definitive guides on truncated vs censored regression in a Bayesian context. They are given some treatment in some Bayesian texts, but I’ve not found it easy to find worked examp…

---

## [Help translating a JAGS model to Turing](https://discourse.julialang.org/t/help-translating-a-jags-model-to-turing/53434)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 7\
**Last updated:** [January 23, 2021, 10:49am UTC](https://discourse.julialang.org/t/help-translating-a-jags-model-to-turing/53434 "2021-01-23T10:49:03Z")

</div>

I’m a beginner with Turing.jl, and am just trying to get to grips with it by translating some examples from the book Bayesian Cognitive Modelling: a practical course. I’ve had some luck with a number of models, but have …

---

## [Turing: indicator variables vs control flow](https://discourse.julialang.org/t/turing-indicator-variables-vs-control-flow/53539)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 9\
**Last updated:** [January 23, 2021, 10:44am UTC](https://discourse.julialang.org/t/turing-indicator-variables-vs-control-flow/53539 "2021-01-23T10:44:39Z")

</div>

I have a change point detection model which I’m converting over from JAGS to Turing, and this one is interesting as it raises the question of whether you should use indicator variables (common to other PPL’s) or to use c…

---

## [Puzzling on a product likelihood using Distributions and Turing](https://discourse.julialang.org/t/puzzling-on-a-product-likelihood-using-distributions-and-turing/52183)

<div class="topic-metadata">

**Author:** [@riegel\_gestr](https://discourse.julialang.org/u/riegel_gestr)\
**Replies:** 2\
**Last updated:** [January 21, 2021, 7:18am UTC](https://discourse.julialang.org/t/puzzling-on-a-product-likelihood-using-distributions-and-turing/52183 "2021-01-21T07:18:47Z")

</div>

I am currently working on a simple bayesian problem in which my likelihood is the product of N poisson distributions, so I got the following: likelihood(x) ~ product\_i(Poisson(mean\_i)) where x is a vector, representing t…

---

## [Turing error with truncated distribution](https://discourse.julialang.org/t/turing-error-with-truncated-distribution/53418)

<div class="topic-metadata">

**Author:** [@BradGroff](https://discourse.julialang.org/u/BradGroff)\
**Replies:** 1\
**Last updated:** [January 20, 2021, 1:08pm UTC](https://discourse.julialang.org/t/turing-error-with-truncated-distribution/53418 "2021-01-20T13:08:17Z")

</div>

Hi, I’m trying to use a truncated distribution within an @model block of the form data ~ truncated(D(parameter), l, u)). This doesn’t seem to work :frowning: . Here’s the full example: @model function decay\_estimator\_t…

---

## [Turing: help with multinomial likelihood](https://discourse.julialang.org/t/turing-help-with-multinomial-likelihood/53484)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.julialang.org/u/drbenvincent)\
**Replies:** 3\
**Last updated:** [January 17, 2021, 7:05pm UTC](https://discourse.julialang.org/t/turing-help-with-multinomial-likelihood/53484 "2021-01-17T19:05:01Z")

</div>

Hi I’m running through a number of JAGS models, converting them to Turing. Mostly this is an easy process, but I’ve got stuck on what is probably something very simple. Original JAGS model: model{ alpha ~ dbeta(1,1) …

---

## [Turing, Inexacterror for DiscreteUniform distribution, with NUTS sampler](https://discourse.julialang.org/t/turing-inexacterror-for-discreteuniform-distribution-with-nuts-sampler/52820)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 5\
**Last updated:** [January 4, 2021, 1:05pm UTC](https://discourse.julialang.org/t/turing-inexacterror-for-discreteuniform-distribution-with-nuts-sampler/52820 "2021-01-04T13:05:47Z")

</div>

First off, thanks so much to everyone involved in making Turing and Julia great! Can’t stress enough how cool Turing is. Also, apologies if my question is not formatted correctly. I’v been getting the same inexact error…

---

## [BoundsError on basic Turing model](https://discourse.julialang.org/t/boundserror-on-basic-turing-model/52701)

<div class="topic-metadata">

**Author:** [@rikh](https://discourse.julialang.org/u/rikh)\
**Replies:** 2\
**Last updated:** [January 2, 2021, 9:07am UTC](https://discourse.julialang.org/t/boundserror-on-basic-turing-model/52701 "2021-01-02T09:07:53Z")

</div>

I’m trying to fit a basic model in Turing. The data consists of some values y (lets say a height) for different groups/categories x. I am trying to learn whether the y-values per group differ, or are the same. To make it…

---

## [Simple Turing model fails for InexactError](https://discourse.julialang.org/t/simple-turing-model-fails-for-inexacterror/52655)

<div class="topic-metadata">

**Author:** [@BradGroff](https://discourse.julialang.org/u/BradGroff)\
**Replies:** 5\
**Last updated:** [December 31, 2020, 7:04pm UTC](https://discourse.julialang.org/t/simple-turing-model-fails-for-inexacterror/52655 "2020-12-31T19:04:55Z")

</div>

Hi all, The model is a simple binomial on binary data: @model function coinflip\_binomial\_broken(y::Array{Int64}) # prior on p p ~ Beta(1, 1) # updates on p heads = sum(y) heads ~ Binomial(lengt…

---

## [Recursive merge for named tuples](https://discourse.julialang.org/t/recursive-merge-for-named-tuples/52072)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 12\
**Last updated:** [December 29, 2020, 4:33pm UTC](https://discourse.julialang.org/t/recursive-merge-for-named-tuples/52072 "2020-12-29T16:33:50Z")

</div>

On the Turing call this morning, I mentioned a need for a very efficient recursive merge on named tuples. @mohamed82008 asked where this need comes in, and… I guess it was too early? Coffee hadn’t kicked in? Something l…

---

## [Ridge Regression using Turing.jl](https://discourse.julialang.org/t/ridge-regression-using-turing-jl/52378)

<div class="topic-metadata">

**Author:** [@Michaela\_Maskova](https://discourse.julialang.org/u/Michaela_Maskova)\
**Replies:** 4\
**Last updated:** [December 26, 2020, 7:56pm UTC](https://discourse.julialang.org/t/ridge-regression-using-turing-jl/52378 "2020-12-26T19:56:27Z")

</div>

Hi everyone, I’m trying to create a model in Turing.jl for Ridge Regression to use HMC. However, I need to sample two parameters, alpha and theta which are dependant on each other via θ ~ MvNormal(zeros(3),α^(-1)) α ~ …

---

## [Implementing sparse Gaussian process model with Turing and Stheno](https://discourse.julialang.org/t/implementing-sparse-gaussian-process-model-with-turing-and-stheno/46886)

<div class="topic-metadata">

**Author:** [@ElOceanografo](https://discourse.julialang.org/u/ElOceanografo)\
**Replies:** 15\
**Last updated:** [December 23, 2020, 12:09am UTC](https://discourse.julialang.org/t/implementing-sparse-gaussian-process-model-with-turing-and-stheno/46886 "2020-12-23T00:09:19Z")

</div>

I’ve built a Turing model for some non-Gaussian data which contains a latent Gaussian process for spatial autocorrelation. I’ve run it on a small simulated dataset to confirm that it works. Now I want to run it on my r…

---

## [How to generate n samples from a peculiar (normally distributed) distribution](https://discourse.julialang.org/t/how-to-generate-n-samples-from-a-peculiar-normally-distributed-distribution/51911)

<div class="topic-metadata">

**Author:** [@Jaidy](https://discourse.julialang.org/u/Jaidy)\
**Replies:** 1\
**Last updated:** [December 16, 2020, 4:12pm UTC](https://discourse.julialang.org/t/how-to-generate-n-samples-from-a-peculiar-normally-distributed-distribution/51911 "2020-12-16T16:12:58Z")

</div>

Hi, I am trying to generate n samples from a distribution as follows: each sample is of size m. Say x is a sample. Then for each of the components {x\_1,x\_2,…x\_m}, x\_i follows a normal distribution with mean 0 and varia…

---

## [Mixture Model fitting with Turing](https://discourse.julialang.org/t/mixture-model-fitting-with-turing/51706)

<div class="topic-metadata">

**Author:** [@asjir](https://discourse.julialang.org/u/asjir)\
**Replies:** 0\
**Last updated:** [December 12, 2020, 9:11am UTC](https://discourse.julialang.org/t/mixture-model-fitting-with-turing/51706 "2020-12-12T09:11:16Z")

</div>

logpdf for a MixtureModel fails to differentiate (for me at least with all AD backends), prohibiting use of Hamiltonian MC and its derivatives for fitting models. The easy workaround is writing Distributions.logpdf(m::M…

---

## [PyMC Models to Turing.jl](https://discourse.julialang.org/t/pymc-models-to-turing-jl/51574)

<div class="topic-metadata">

**Author:** [@Stefan\_Bringuier](https://discourse.julialang.org/u/Stefan_Bringuier)\
**Replies:** 5\
**Last updated:** [December 11, 2020, 9:45pm UTC](https://discourse.julialang.org/t/pymc-models-to-turing-jl/51574 "2020-12-11T21:45:14Z")

</div>

I’m learning (beginner) some Bayesian methods from books like Bayesian Methods for Hackers, C. Davidson-Pilon and Bayesian Analysis with Python. However, I prefer to do most of my workflows using Julia and I would like t…

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

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