To make a truncated distribution

The front end.
Post Reply
charlie
Posts: 66
Joined: Wed Aug 09, 2017 10:55 pm

To make a truncated distribution

Post by charlie »

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 user-defined, 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 user-defined 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 out-of-bound 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
Attachments
Truncated distribution.xdsl
(3.83 KiB) Downloaded 392 times
charlie
Posts: 66
Joined: Wed Aug 09, 2017 10:55 pm

Re: To make a truncated distribution

Post by charlie »

I now realized a problem associated with checking "reject out-of-bound 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
marek [BayesFusion]
Site Admin
Posts: 430
Joined: Tue Dec 11, 2007 4:24 pm

Re: To make a truncated distribution

Post by marek [BayesFusion] »

I now realized a problem associated with checking "reject out-of-bound 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?
Hi Charlie,

You have identified a bug in GeNIe (samples are not normalized correctly) -- we will fix it in the upcoming service release.
The need: to truncate a distribution of any form including a user-defined, 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 user-defined one.
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 out-of-bounds samples should do the job (once we fix the issue with the discrete nodes that you have identified).

Marek
charlie
Posts: 66
Joined: Wed Aug 09, 2017 10:55 pm

Re: To make a truncated distribution

Post by charlie »

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
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: To make a truncated distribution

Post by shooltz[BayesFusion] »

GeNIe 2.3.3828 (available now) fixes the issues reported in this forum thread.
charlie
Posts: 66
Joined: Wed Aug 09, 2017 10:55 pm

Re: To make a truncated distribution

Post by charlie »

Indeed. Thank you.
shooltz[BayesFusion] wrote: Thu Feb 28, 2019 8:51 pm GeNIe 2.3.3828 (available now) fixes the issues reported in this forum thread.
Post Reply