# Any variational bayesian package that allows user defined custom distribution (getq in turing)

**URL:** https://discourse.julialang.org/t/any-variational-bayesian-package-that-allows-user-defined-custom-distribution-getq-in-turing/112946
**Category:** Probabilistic Programming
**Tags:** package, turing
**Created:** [April 15, 2024, 4:53am UTC](https://discourse.julialang.org/t/any-variational-bayesian-package-that-allows-user-defined-custom-distribution-getq-in-turing/112946 "2024-04-15T04:53:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![swsw](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@swsw](https://discourse.julialang.org/u/swsw)
#### Post date: [April 15, 2024, 4:53am UTC](https://discourse.julialang.org/t/any-variational-bayesian-package-that-allows-user-defined-custom-distribution-getq-in-turing/112946/1 "2024-04-15T04:53:45Z")

</div>

Hi all,

I wondered if there’s any package that allow the user to specify any kind of distribution as q(Z).

I think in [https://turinglang.org/v0.30/tutorials/09-variational-inference](https://turinglang.org/v0.30/tutorials/09-variational-inference)/ it is mentioned that by default the mean field assumption is used. However, in the section “ **Relaxing the mean-field assumption¶** ” it indicates that users can change the covariance to a non-diagonal matrix but still as I understand it should be a (multi)normal distribution. I wonder if other types of distributions are allowed to specify q(Z). Thanks in advance.

---

<div class="post-metadata">

### Author: ![swsw](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@swsw](https://discourse.julialang.org/u/swsw)
#### Post date: [April 17, 2024, 8:13am UTC](https://discourse.julialang.org/t/any-variational-bayesian-package-that-allows-user-defined-custom-distribution-getq-in-turing/112946/2 "2024-04-17T08:13:02Z")

</div>

Or is it possible to specify a **non-normal distribution for the target variable** say exponential in stead of that used by default in vi() which I think is independent normally distributed variables.
