To make a truncated distribution

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

To make a truncated distribution

Post by charlie » Sun Feb 24, 2019 12:51 am

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 50 times

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

Re: To make a truncated distribution

Post by charlie » Mon Feb 25, 2019 6:17 am

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: 270
Joined: Tue Dec 11, 2007 4:24 pm

Re: To make a truncated distribution

Post by marek [BayesFusion] » Mon Feb 25, 2019 5:43 pm

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: 60
Joined: Wed Aug 09, 2017 10:55 pm

Re: To make a truncated distribution

Post by charlie » Tue Feb 26, 2019 12:36 am

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: 1181
Joined: Mon Nov 26, 2007 5:51 pm

Re: To make a truncated distribution

Post by shooltz[BayesFusion] » Thu Feb 28, 2019 8:51 pm

GeNIe 2.3.3828 (available now) fixes the issues reported in this forum thread.

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

Re: To make a truncated distribution

Post by charlie » Fri Mar 01, 2019 12:48 am

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