Hello,
premise: I replicated the suspect behavior in the attached small three-node non-discretized equation nodes, but I observed it in a larger network where I do not know if it might posit a problem, or not. The function Max(1,Min(13,Uniform(-6,6)+Uniform(1,13)) should be symmetric, with two peaks of probability mass at the extremes 1 and 13 (figure by wolfram):
Untitled.png
In GeNIe distribution visualizer, instead, it appears systematically shifted towards 1:
[img][/Screenshot 2026-03-03 alle 20.05.42.png]
I see that when you increase the bins, the asymmetry sometimes disappears, but it is still present quite often. Furthermore, in the original network I will discretize the node in 13 states, and with 13 bins the asymmetry is always present, even with very large MC samples.
Why is this happening? there is a bias toward values low bins at the margins of the bins? (but the equation nodes in the net attached are not even discretized, and the problem is present in the node "cut sum"). There's a way to solve the problem and show the function as symmetrical?
Thank you in advance for any help!
possible bug?
-
PCherubini
- Posts: 35
- Joined: Thu Mar 24, 2022 9:00 am
possible bug?
- Attachments
-
- the distribution in the genie visualizer
- Screenshot 2026-03-03 alle 20.05.42.png (94.81 KiB) Viewed 696 times
-
- possible bug.xdsl
- non discretized mini-net for observing the asymmetry
- (1.42 KiB) Downloaded 27 times
-
- the distribution in wolfram math
- Untitled.png (28.66 KiB) Viewed 696 times
-
shooltz[BayesFusion]
- Site Admin
- Posts: 1486
- Joined: Mon Nov 26, 2007 5:51 pm
Re: possible bug?
I think this is mostly the visualization issue. I will look into discretization, for now please note how Wolfram produces asymmetric histogram too.
You can check your expression with our online probability distribution visualizer at https://prob.bayesfusion.com/- it generates samples using SMILE on the backend, but the histogram is drawn by in the browser by code which is independent from GeNIe's visualization.
Another option is to select all samples in GeNIe's node value page, and paste them into Google Sheets, where you can create a histogram like this:
Another option is to select all samples in GeNIe's node value page, and paste them into Google Sheets, where you can create a histogram like this:
-
shooltz[BayesFusion]
- Site Admin
- Posts: 1486
- Joined: Mon Nov 26, 2007 5:51 pm
Re: possible bug?
In the spreadsheet below, column "A" has values copied directly from GeNIe. Column "I" has values generated using the following Sheets formula:
When the number of histogram buckets is reduced, both show similar asymmetry:
Code: Select all
= Max(1,Min(13,-6+12*rand()+1+12*rand()))-
PCherubini
- Posts: 35
- Joined: Thu Mar 24, 2022 9:00 am
Re: possible bug?
Ok. I confirm your observations, the visualization asymmetry appears in excel, wolfram, etc. Perhaps it springs from some bias toward lower values in visualization algorithms using bins, and if so it should not affect the accuracy of the network. Thank you!