Visual Bayesic Documentation¶
- Release:
0.1.dev19+gc3d2b81.d20231101
- Date:
26 February 2024
- Source:
Visual Bayesic¶
Welcome to Visual Bayesic, the forefront of Bayesian inversion through visual scripting!
If you are looking to harness the power of Bayesian inference, Visual Bayesic offers an intuitive graphical interface paired with robust Python functionalities, making the entire process seamless and user-friendly.
Your Contribution Makes a Difference¶
Join our growing community of contributors! Whether you’re fixing bugs, proposing new features, or enhancing documentation, your input is valuable. Let’s build the future of Bayesian scripting together.
Explore Our Comprehensive Guides¶
- orphan:
Gallery¶
Experience Visual Bayesic in action. Explore our galleries to see practical examples, detailed tutorials, and more. Get inspired and learn new techniques.
Tutorials¶
Here you will find a selection of examples showing what can you do and how you can do it.
Getting Started with Visual Scripting in Bayesian Inference
Getting started with Visual Bayesic
Simple example using Pyro: Moving the bell¶
We can sum up the workflow above in the following steps:
We chose a probabilistic density function family \(\pi\)—e.g., of the Gaussian or uniform families, \(\pi_S(\theta)\) to approximate the data generating process.
We narrow the possible values of \(\theta\)—mean and standard deviation in the case of a Normal distribution—with domain knowledge (notice that although \(\pi_S\) is a subset of \(\pi_P\), its size is infinite and therefore exhaustive approaches are unfeasible).
We use Bayesian inference to condition the prior estimations to our samples of reality \(\pi_S(\tilde{y})|\theta)\).
Back to the thickness example, we need to assign some prior distribution to the mean and standard deviation of the thickness; for example, we can take a naive approach and use the values of the crust, or on the contrary, we could use only the data we gathered and maybe one or two references. At this stage, there is not one single valid answer. To analyze how different priors affect, we will use 4 possible configurations, 2 of them using a normal distribution for the mean of a Gaussian likelihood function and the other 2 using a uniform distribution—between 0 and 10 in order to keep it as uninformative as possible while still giving valid physical values:
Normal |
Uniform |
---|---|
\(\theta_\mu \sim \mathcal{N}(\mu=2.08, \sigma=0.07)\) |
\(\theta_\mu \sim \mathcal{U}(a=0, b=10)\) |
\(\theta_\sigma \sim \Gamma(\alpha=0.3, \beta=3)\) |
\(\theta_\sigma \sim \Gamma(=1.0, \beta=0.7)\) |
\(\pi_S(y|\theta) \sim \mathcal{N}(\mu=\theta_\mu, \sigma=\theta_\sigma)\) |
\(\pi_S(y|\theta) \sim \mathcal{N}(\mu=\theta_\mu, \sigma=\theta_\sigma)\) |
The standard deviation is in both cases a quite uninformative Gamma distribution. Besides using different probability functions to describe one of the model parameters, we have also repeated the same simulation either using one observation, \(\tilde{y}\) at 2.12 m, or 10 observation spread randomly (as random as a human possibly can) around 2.10. Figure fig-models1
shows the joint prior (in blue) and posterior (in red) distributions for the 4 probabilistic models, as well as, the maximum likelihood function.
Visual Scripting compiled model
Normal Prior, several observations
Uniform Prior, several observations
Uniform Prior, single observation
Normal Prior, single observation
Example of a Pyro model and inference
External Examples¶
Got an impressive Bayesian inference workflow or visualization routine? Share it with the community! Contribute your work and help others learn from your expertise. Submit a PR at visual-bayesic/visual-bayesic, and we’d be excited to feature it.
Caution
Please note that these 2-examples link to external websites. If any of these links are broken, please raise an issue.
Do you have a sophisticated Bayesian inference workflow or visualization routine you would like to share? If so, please consider contributing your work by submitting a PR at visual-bayesic/visual-bayesic. We welcome contributions and would be delighted to include your work in our collection.