# Probabilistic Programming

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

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

**Page:** 7

---

## [Turing.jl - NUTS gets stuck in "The current proposal will be rejected... isfinite.((θ, r, ℓπ, ℓκ)) = (true, true, false, true)"](https://discourse.julialang.org/t/turing-jl-nuts-gets-stuck-in-the-current-proposal-will-be-rejected-isfinite-r-true-true-false-true/81428)

<div class="topic-metadata">

**Author:** [@rkmalaiya](https://discourse.julialang.org/u/rkmalaiya)\
**Replies:** 7\
**Last updated:** [November 22, 2022, 8:37pm UTC](https://discourse.julialang.org/t/turing-jl-nuts-gets-stuck-in-the-current-proposal-will-be-rejected-isfinite-r-true-true-false-true/81428 "2022-11-22T20:37:22Z")

</div>

I am trying to implement a model similar to Maas et al 2011 - equation 12 and 13 (details of my implementation below). The issue I am facing is that I am not able to use NUTS with this model. I get repeated numerical in…

---

## [Recommendations for learning basic probabilistic simulation](https://discourse.julialang.org/t/recommendations-for-learning-basic-probabilistic-simulation/90508)

<div class="topic-metadata">

**Author:** [@samerb](https://discourse.julialang.org/u/samerb)\
**Replies:** 3\
**Last updated:** [November 19, 2022, 11:16pm UTC](https://discourse.julialang.org/t/recommendations-for-learning-basic-probabilistic-simulation/90508 "2022-11-19T23:16:59Z")

</div>

I’m looking to learn how to do probabilistic simulations: both the math and the programming. Is there a good online course or tutorial for this in Julia (if not, just a good one for the math)? Background: I have a rudi…

---

## [How to use ParetoSmooth.jl](https://discourse.julialang.org/t/how-to-use-paretosmooth-jl/79493)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 12\
**Last updated:** [November 19, 2022, 1:34am UTC](https://discourse.julialang.org/t/how-to-use-paretosmooth-jl/79493 "2022-11-19T01:34:35Z")

</div>

It looks like ParetoSmooth.jl is fairly new so the documentation is lacking examples right now. I’m wondering if someone with experience using the package can assist. Here’s a simple MWE: using ParetoSmooth using StatsB…

---

## [\[DynamicPPL\] attempt to link a linked vi](https://discourse.julialang.org/t/dynamicppl-attempt-to-link-a-linked-vi/87572)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 4\
**Last updated:** [November 16, 2022, 4:23pm UTC](https://discourse.julialang.org/t/dynamicppl-attempt-to-link-a-linked-vi/87572 "2022-11-16T16:23:44Z")

</div>

I am getting this warning multiple times and the NUTS sampler doesn’t terminate. Can you please explain what is happening for an end user of Turing.jl? The warning message is not very helpful. How can I further debug th…

---

## [Sample \`arraydist\` of \`filldist\`s in Turing](https://discourse.julialang.org/t/sample-arraydist-of-filldist-s-in-turing/90225)

<div class="topic-metadata">

**Author:** [@filchristou](https://discourse.julialang.org/u/filchristou)\
**Replies:** 0\
**Last updated:** [November 14, 2022, 8:35am UTC](https://discourse.julialang.org/t/sample-arraydist-of-filldist-s-in-turing/90225 "2022-11-14T08:35:09Z")

</div>

Is it possible to sample many filldistss using arraydist in Turing.jl? For example, say I have data of the following structure: and every key-value comes from an Exponential distribution. I know of a prior for each…

---

## [Constrained Priors and Bijectors](https://discourse.julialang.org/t/constrained-priors-and-bijectors/90141)

<div class="topic-metadata">

**Author:** [@marcobonici](https://discourse.julialang.org/u/marcobonici)\
**Replies:** 7\
**Last updated:** [November 12, 2022, 7:07pm UTC](https://discourse.julialang.org/t/constrained-priors-and-bijectors/90141 "2022-11-12T19:07:21Z")

</div>

Hi to everybody! I have been using AdvancedHMC NUTS implementation and I am quite satisfied with the result I am obtaining. The model I am trying to study is quite simple logℓ(θ) = logpdf(MvNormal(data, mycov), theory…

---

## [Parameter estimation ODEs](https://discourse.julialang.org/t/parameter-estimation-odes/64053)

<div class="topic-metadata">

**Author:** [@NickJ](https://discourse.julialang.org/u/NickJ)\
**Replies:** 6\
**Last updated:** [November 8, 2022, 7:10pm UTC](https://discourse.julialang.org/t/parameter-estimation-odes/64053 "2022-11-08T19:10:43Z")

</div>

Hi all, I am a beginner in both Julia and Bayesian inference, and I am interested in Turing.jl to learn about both. I am a mechanical engineer who typically works with deterministic ODEs, i.e. given some parameters as i…

---

## [Data stitching](https://discourse.julialang.org/t/data-stitching/89662)

<div class="topic-metadata">

**Author:** [@gustaphe](https://discourse.julialang.org/u/gustaphe)\
**Replies:** 30\
**Last updated:** [November 7, 2022, 10:10pm UTC](https://discourse.julialang.org/t/data-stitching/89662 "2022-11-07T22:10:48Z")

</div>

I’m looking for a package or an algorithm, alternatively an explanation of why what I want is impossible or bad: I have a set of data x1, y1 ≈ f.(x1) and one x2, y2 ≈ a\*f.(x2) .+ b for some natural black box function f …

---

## [NUTS Sampler stuck in rejected due to numerical errors](https://discourse.julialang.org/t/nuts-sampler-stuck-in-rejected-due-to-numerical-errors/89571)

<div class="topic-metadata">

**Author:** [@astro-kevin](https://discourse.julialang.org/u/astro-kevin)\
**Replies:** 0\
**Last updated:** [October 31, 2022, 3:35pm UTC](https://discourse.julialang.org/t/nuts-sampler-stuck-in-rejected-due-to-numerical-errors/89571 "2022-10-31T15:35:32Z")

</div>

The Turing sampler seems to be stuck on Warning: The current proposal will be rejected due to numerical error(s). │ isfinite.((θ, r, ℓπ, ℓκ)) = (true, false, false, false) There seems to have been others who have fac…

---

## [MCMC Benchmark](https://discourse.julialang.org/t/mcmc-benchmark/63013)

<div class="topic-metadata">

**Author:** [@mschauer](https://discourse.julialang.org/u/mschauer)\
**Replies:** 14\
**Last updated:** [October 25, 2022, 2:48pm UTC](https://discourse.julialang.org/t/mcmc-benchmark/63013 "2022-10-25T14:48:52Z")

</div>

In MCMC there is always the issue that there are no established benchmarks. C.f. for example machine learning - Performance benchmarks for MCMC - Cross Validated . There are some related efforts in the community, e.g…

---

## [Obtaining the posterior distribution of parameters in Turing using the MCMC method](https://discourse.julialang.org/t/obtaining-the-posterior-distribution-of-parameters-in-turing-using-the-mcmc-method/89111)

<div class="topic-metadata">

**Author:** [@Aru](https://discourse.julialang.org/u/Aru)\
**Replies:** 3\
**Last updated:** [October 22, 2022, 6:35pm UTC](https://discourse.julialang.org/t/obtaining-the-posterior-distribution-of-parameters-in-turing-using-the-mcmc-method/89111 "2022-10-22T18:35:37Z")

</div>

Hello everyone. I am a student majoring in physics with no solid background in statistics. I recently tried to use Turing, but I found that there are some hard-to-understand problems that make it difficult for me to use …

---

## [TypeError: in typeassert, expected Float64, got a value of type ForwardDiff.Dual{Nothing, Float64, 12}](https://discourse.julialang.org/t/typeerror-in-typeassert-expected-float64-got-a-value-of-type-forwarddiff-dual-nothing-float64-12/88959)

<div class="topic-metadata">

**Author:** [@mauricio\_k8](https://discourse.julialang.org/u/mauricio_k8)\
**Replies:** 8\
**Last updated:** [October 19, 2022, 3:42pm UTC](https://discourse.julialang.org/t/typeerror-in-typeassert-expected-float64-got-a-value-of-type-forwarddiff-dual-nothing-float64-12/88959 "2022-10-19T15:42:59Z")

</div>

Dear all, I am to fit a model that uses an interaction surface in Turing.jl, the interaction surface is a function that is outside the model but gets called inside the model to estimate the competitive equivalence of ind…

---

## [ReactiveMP hierarchical linear regression](https://discourse.julialang.org/t/reactivemp-hierarchical-linear-regression/88112)

<div class="topic-metadata">

**Author:** [@SebastianCallh](https://discourse.julialang.org/u/SebastianCallh)\
**Replies:** 4\
**Last updated:** [October 18, 2022, 4:24pm UTC](https://discourse.julialang.org/t/reactivemp-hierarchical-linear-regression/88112 "2022-10-18T16:24:24Z")

</div>

Hello, I am playing around with ReactiveMP and wanted to try a hierarchical linear regression model. I tried adapting the linear regression example in the docs, but I cannot figure out how to properly index the group l…

---

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

<div class="topic-metadata">

**Author:** [@marouane](https://discourse.julialang.org/u/marouane)\
**Replies:** 11\
**Last updated:** [October 13, 2022, 1:31pm UTC](https://discourse.julialang.org/t/custom-multivariate-distribution-in-turing-jl/88414 "2022-10-13T13:31:35Z")

</div>

I want to use a custom multivariate distribution that actually generates arrays, and I want to know if there’s anything I need to modify in order to be adapted to be used in Turing using Distributions struct OrthoNNDist…

---

## [Parameter Fitting in Turing](https://discourse.julialang.org/t/parameter-fitting-in-turing/88412)

<div class="topic-metadata">

**Author:** [@astro-kevin](https://discourse.julialang.org/u/astro-kevin)\
**Replies:** 15\
**Last updated:** [October 12, 2022, 4:56pm UTC](https://discourse.julialang.org/t/parameter-fitting-in-turing/88412 "2022-10-12T16:56:18Z")

</div>

I am trying to run an MCMC to find the posterior of parameters of my model using Turing. The setup I have currently is the model itself, and a randomly sampled dataset I run through the model to yield values from the mod…

---

## [Turing.jl run not reproducible!](https://discourse.julialang.org/t/turing-jl-run-not-reproducible/88288)

<div class="topic-metadata">

**Author:** [@aelmokadem](https://discourse.julialang.org/u/aelmokadem)\
**Replies:** 17\
**Last updated:** [October 10, 2022, 12:03pm UTC](https://discourse.julialang.org/t/turing-jl-run-not-reproducible/88288 "2022-10-10T12:03:20Z")

</div>

Hi all, I am running a Turing.jl model (an ODE model) and the results I am getting change every time I run the script. I have a seed set at the beginning of the script and there is more than one call to RNG in there but…

---

## [Recommended way to extract logprob and build gradients in Turing.jl?](https://discourse.julialang.org/t/recommended-way-to-extract-logprob-and-build-gradients-in-turing-jl/88279)

<div class="topic-metadata">

**Author:** [@svilupp](https://discourse.julialang.org/u/svilupp)\
**Replies:** 2\
**Last updated:** [October 5, 2022, 11:19am UTC](https://discourse.julialang.org/t/recommended-way-to-extract-logprob-and-build-gradients-in-turing-jl/88279 "2022-10-05T11:19:15Z")

</div>

Hi everyone, What is the recommended way to extract the log density and build gradients from a Turing model? (DynamicPPL) Use cases: eg, feeding it to something like Pathfinder.jl (if it didn’t Turing API) or novel sam…

---

## [Error with bunchkaufman factorization in Turing.jl](https://discourse.julialang.org/t/error-with-bunchkaufman-factorization-in-turing-jl/88174)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 0\
**Last updated:** [October 3, 2022, 5:58pm UTC](https://discourse.julialang.org/t/error-with-bunchkaufman-factorization-in-turing-jl/88174 "2022-10-03T17:58:21Z")

</div>

I have a Turing.jl model that makes use of the LinearAlgebra.bunchkaufman factorization routine. Whenever I try to sample from the posterior, I get the following error message saying that there is no method available wit…

---

## [Inferring marginal distributions on graphs](https://discourse.julialang.org/t/inferring-marginal-distributions-on-graphs/88159)

<div class="topic-metadata">

**Author:** [@hbooth](https://discourse.julialang.org/u/hbooth)\
**Replies:** 0\
**Last updated:** [October 3, 2022, 1:36pm UTC](https://discourse.julialang.org/t/inferring-marginal-distributions-on-graphs/88159 "2022-10-03T13:36:59Z")

</div>

Hi all, I am looking for some guidance on how to approach a computational problem I have, hopefully using some of the amazing julia packages! This is early stages, and more conceptual at this point. I want to get some h…

---

## [Bayesian multidimensional scaling in Turing.jl, no samples accepted?](https://discourse.julialang.org/t/bayesian-multidimensional-scaling-in-turing-jl-no-samples-accepted/87678)

<div class="topic-metadata">

**Author:** [@pjentsch0](https://discourse.julialang.org/u/pjentsch0)\
**Replies:** 1\
**Last updated:** [September 23, 2022, 3:26pm UTC](https://discourse.julialang.org/t/bayesian-multidimensional-scaling-in-turing-jl-no-samples-accepted/87678 "2022-09-23T15:26:19Z")

</div>

I am trying to implement bayesian multidimensional scaling in Turing (from this paper: https://sites.stat.washington.edu/raftery/Research/PDF/oh2001.pdf). I have a model that I think is correct, but it seems no samples g…

---

## [Cannot evaluate a vector for some ProductDistribution](https://discourse.julialang.org/t/cannot-evaluate-a-vector-for-some-productdistribution/87224)

<div class="topic-metadata">

**Author:** [@Luis\_Calderon](https://discourse.julialang.org/u/Luis_Calderon)\
**Replies:** 1\
**Last updated:** [September 14, 2022, 10:34am UTC](https://discourse.julialang.org/t/cannot-evaluate-a-vector-for-some-productdistribution/87224 "2022-09-14T10:34:38Z")

</div>

Dear all, I wish to specify a scaled inverse Wishart as formulated in this pdf, bottom of page 3. I understand how to implement it and have the following code so far (focused on the distributions). I’m focused on the ca…

---

## [How Bayesian estimation of parameters of ODE system is done?](https://discourse.julialang.org/t/how-bayesian-estimation-of-parameters-of-ode-system-is-done/87092)

<div class="topic-metadata">

**Author:** [@vembha](https://discourse.julialang.org/u/vembha)\
**Replies:** 4\
**Last updated:** [September 11, 2022, 10:19pm UTC](https://discourse.julialang.org/t/how-bayesian-estimation-of-parameters-of-ode-system-is-done/87092 "2022-09-11T22:19:46Z")

</div>

Hello people, I tried to find texts, journal articles, blog posts, etc., to understand how Bayesian estimation (for example, NUTS) works for ODE parameter estimation, but I could not. None of the material I found on the…

---

## [Survival analysis in Turing: vectorized version leads to strange errors](https://discourse.julialang.org/t/survival-analysis-in-turing-vectorized-version-leads-to-strange-errors/86301)

<div class="topic-metadata">

**Author:** [@vfonov](https://discourse.julialang.org/u/vfonov)\
**Replies:** 5\
**Last updated:** [September 2, 2022, 1:03pm UTC](https://discourse.julialang.org/t/survival-analysis-in-turing-vectorized-version-leads-to-strange-errors/86301 "2022-09-02T13:03:31Z")

</div>

I have an example for a simple survival analysis in Turing that works fine when using loop but produces strange errors when I attempt to convert it to vectorized form: # Import Turing and Distributions. using Turing, Di…

---

## [MAP Optimization and RAM usage related to autodiff](https://discourse.julialang.org/t/map-optimization-and-ram-usage-related-to-autodiff/86388)

<div class="topic-metadata">

**Author:** [@jweinstk](https://discourse.julialang.org/u/jweinstk)\
**Replies:** 0\
**Last updated:** [August 26, 2022, 2:28pm UTC](https://discourse.julialang.org/t/map-optimization-and-ram-usage-related-to-autodiff/86388 "2022-08-26T14:28:39Z")

</div>

Hi there probabilistic programming folks - I’ve enjoyed reading the posts here and now have one of my own. I am trying to estimate the MAP of a multivariate linear model with a mixture model component using Turing (will …

---

## [Inconsistent size of the ODE solution object for Turing inference](https://discourse.julialang.org/t/inconsistent-size-of-the-ode-solution-object-for-turing-inference/86080)

<div class="topic-metadata">

**Author:** [@vembha](https://discourse.julialang.org/u/vembha)\
**Replies:** 5\
**Last updated:** [August 23, 2022, 11:29am UTC](https://discourse.julialang.org/t/inconsistent-size-of-the-ode-solution-object-for-turing-inference/86080 "2022-08-23T11:29:03Z")

</div>

Hello people, I’ve been using Turing to infer parameters of an ODE model for close to a year. But since recently, I am facing the following non-reproducible error from the code, which I haven’t encountered previously: S…

---

## [Trouble coding a continuous / discrete 'mixture model' in Turing](https://discourse.julialang.org/t/trouble-coding-a-continuous-discrete-mixture-model-in-turing/86009)

<div class="topic-metadata">

**Author:** [@eduardo-zambrano](https://discourse.julialang.org/u/eduardo-zambrano)\
**Replies:** 20\
**Last updated:** [August 22, 2022, 4:07am UTC](https://discourse.julialang.org/t/trouble-coding-a-continuous-discrete-mixture-model-in-turing/86009 "2022-08-22T04:07:11Z")

</div>

Hi!. I have a generative process of the following kind: it generates a number of zeros, and then Normal draws, up to 1000, as follows: μ, σ, α, N = 0, 1, 0.3, 1000 # Parameters of the generative process logistic(x) = …

---

## [Recommended sampler for data with Categorical likelihood](https://discourse.julialang.org/t/recommended-sampler-for-data-with-categorical-likelihood/85820)

<div class="topic-metadata">

**Author:** [@mthelm85](https://discourse.julialang.org/u/mthelm85)\
**Replies:** 1\
**Last updated:** [August 16, 2022, 9:36pm UTC](https://discourse.julialang.org/t/recommended-sampler-for-data-with-categorical-likelihood/85820 "2022-08-16T21:36:27Z")

</div>

The NUTS sampler takes a really long time in this MWE: using Distributions using Turing d = Categorical(\[0.7, 0.29, 0.01\]) N = 100 Y = rand(d, N) @model function test(Y) p ~ Dirichlet(\[2,2,2\]) for i in 1:N …

---

## [ReactiveMP: How to run linear model with multiple predictors and an intercept](https://discourse.julialang.org/t/reactivemp-how-to-run-linear-model-with-multiple-predictors-and-an-intercept/85290)

<div class="topic-metadata">

**Author:** [@EvoArt](https://discourse.julialang.org/u/EvoArt)\
**Replies:** 9\
**Last updated:** [August 5, 2022, 3:03pm UTC](https://discourse.julialang.org/t/reactivemp-how-to-run-linear-model-with-multiple-predictors-and-an-intercept/85290 "2022-08-05T15:03:15Z")

</div>

Hi there I would like to adapt the linear regression example from the docs to work with multiple predictor variables. So far, I have the following code, which runs. using GraphPPL, Rocket, ReactiveMP, LinearAlgebra n …

---

## [How to initialize an array of Turing variables?](https://discourse.julialang.org/t/how-to-initialize-an-array-of-turing-variables/85205)

<div class="topic-metadata">

**Author:** [@jpm](https://discourse.julialang.org/u/jpm)\
**Replies:** 2\
**Last updated:** [August 3, 2022, 9:46pm UTC](https://discourse.julialang.org/t/how-to-initialize-an-array-of-turing-variables/85205 "2022-08-03T21:46:31Z")

</div>

I am new to Turing and in the process of translating a complex dynamical stochastic model from Stan to Turing. Instead of declaring individual variables (many of them arrays), I would like to include them in a dictionary…

---

## [Julia package dealing with propagation of uncertainty](https://discourse.julialang.org/t/julia-package-dealing-with-propagation-of-uncertainty/84472)

<div class="topic-metadata">

**Author:** [@Firstname\_Lastname](https://discourse.julialang.org/u/Firstname_Lastname)\
**Replies:** 3\
**Last updated:** [July 23, 2022, 11:39pm UTC](https://discourse.julialang.org/t/julia-package-dealing-with-propagation-of-uncertainty/84472 "2022-07-23T23:39:40Z")

</div>

In a static problem, there is uncertainty in some input, like I = a \\pm b. The output \[a function of spatial variables, i.e. f(x,y)\] is uncertain due to uncertain input. For each input sample, randomly generated, the fun…

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

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