# Please tell me about the following Turing.jl processing

**URL:** <https://discourse.julialang.org/t/please-tell-me-about-the-following-turing-jl-processing/61202>\
**Category:** Probabilistic Programming\
**Tags:** question\
**Created:** [May 15, 2021, 2:02pm UTC](https://discourse.julialang.org/t/please-tell-me-about-the-following-turing-jl-processing/61202 "2021-05-15T14:02:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon20242138](https://avatars.discourse-cdn.com/v4/letter/a/e5b9ba/32.png) [@anon20242138](https://discourse.julialang.org/u/anon20242138)\
**Post date:** [May 15, 2021, 2:02pm UTC](https://discourse.julialang.org/t/please-tell-me-about-the-following-turing-jl-processing/61202/1 "2021-05-15T14:02:42Z")

</div>

What does the following process mean?  
What does “Observe each prediction.” mean?  
_This code from Turing tutorials ( [https://turing.ml/dev/tutorials/3-bayesnn/](https://turing.ml/dev/tutorials/3-bayesnn/) )_

for i = 1:length(ts)  
ts[i] ~ Bernoulli(preds[i])  
end

---

<div class="post-metadata">

**Author:** ![lhnguyen-vn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lhnguyen-vn/32/15449_2.png) [@lhnguyen-vn](https://discourse.julialang.org/u/lhnguyen-vn)\
**Post date:** [May 15, 2021, 5:37pm UTC](https://discourse.julialang.org/t/please-tell-me-about-the-following-turing-jl-processing/61202/2 "2021-05-15T17:37:37Z")

</div>

In short, the rough idea of Bayesian neural networks is to treat the output as observations from distributions. By providing data of the expected output, we can adjust and update our distributions accordingly. For this binary classification example, we’re modeling the class label as a draw from a Bernoulli distribution with probability `preds[i]`, hence “observing” each prediction.
