On the previous thread of discussion with GeNIe administrators, I summarize here the way I make a truncated distribution  hopefully of some reference value to others who have a similar need.
The need: to truncate a distribution of any form including a userdefined, at a cutoff which may be a fixed number, or more generally, a stochastic variable subjected to its own distribution of any form incl. a userdefined one.
The method:
1. create an equation node ("Original distribution") containing the definition of the desired original distribution
2. create an equation node ("Threshold") containing the definition of the desired cutoff distribution
3. create an equation node ("Truncated distribution") to truncate the original distribution by
* dumping all the occurrences before the cutoff to the lowest point of the range (zero in my case, see the attached), and
* setting the lower bound of equation domain to a value slightly greater than the lowest point (zero in my case) to exclude the dump
4. In Network Properties, check the box of "Reject outofbound and invalid samples"
The downside of the method is that a significant proportion of samples that fall outside the cutoff will be wasted.
Cheers
Charlie
To make a truncated distribution
To make a truncated distribution
 Attachments

 Truncated distribution.xdsl
 (3.83 KiB) Downloaded 87 times
Re: To make a truncated distribution
I now realized a problem associated with checking "reject outofbound and invalid sample" in Network Property  in a hybrid model, a child discrete chance node (as the "test" node in the attached example) won't get the probabilities of all of its states added to 100%. In the attached example, it adds only to around 78%. This makes the net look very weird. Any suggestion?
Charlie
Charlie

 Site Admin
 Posts: 271
 Joined: Tue Dec 11, 2007 4:24 pm
Re: To make a truncated distribution
Hi Charlie,I now realized a problem associated with checking "reject outofbound and invalid sample" in Network Property  in a hybrid model, a child discrete chance node (as the "test" node in the attached example) won't get the probabilities of all of its states added to 100%. In the attached example, it adds only to around 78%. This makes the net look very weird. Any suggestion?
You have identified a bug in GeNIe (samples are not normalized correctly)  we will fix it in the upcoming service release.
This can be done currently with "Reject out of bounds and invalid samples". We are not planing to add this as a method/function, as this may lead to infinite sampling times in case the constraints are not reasonable (i.e., valid samples have extremely low probability). I believe that rejecting outofbounds samples should do the job (once we fix the issue with the discrete nodes that you have identified).The need: to truncate a distribution of any form including a userdefined, at a cutoff which may be a fixed number, or more generally, a stochastic variable subjected to its own distribution of any form incl. a userdefined one.
Marek
Re: To make a truncated distribution
Hi Marek
I really wish the new service release with the bug fixed could be made available asap. There is a current opportunity for me to demonstrate the power of GeNIe with hybrid net, to my coworkers and managers.
Thanks
Charlie
I really wish the new service release with the bug fixed could be made available asap. There is a current opportunity for me to demonstrate the power of GeNIe with hybrid net, to my coworkers and managers.
Thanks
Charlie

 Site Admin
 Posts: 1202
 Joined: Mon Nov 26, 2007 5:51 pm
Re: To make a truncated distribution
GeNIe 2.3.3828 (available now) fixes the issues reported in this forum thread.
Re: To make a truncated distribution
Indeed. Thank you.
shooltz[BayesFusion] wrote: ↑Thu Feb 28, 2019 8:51 pmGeNIe 2.3.3828 (available now) fixes the issues reported in this forum thread.