SMILE.COM for Continuous and hybrid models

The engine.
Post Reply
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

SMILE.COM for Continuous and hybrid models

Post by jdtoellner »

Thanks for the upgrade. I've attached an Excel Workbook and a GeNie model that displays a Beta distribution. You can enter an alpha and a beta. Excel will graph the distribution.
BetaDistribution.zip
(27.33 KiB) Downloaded 327 times
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: SMILE.COM for Continuous and hybrid models

Post by jdtoellner »

You mentioned "for continuous nodes, GetNodeValue returns either samples or discretized beliefs, depending on the inference applied by SMILE based on the evidence set in the network".

In the attached model I created a discrete node "discrete_beta_distribution" and used that to get access to the discretized beliefs.

How do I set up the model so that I can get this discretized beliefs from the continuous node?

(I.e. I'd like to avoid setting up a separate discrete node.)
shooltz[BayesFusion]
Site Admin
Posts: 1314
Joined: Mon Nov 26, 2007 5:51 pm

Re: SMILE.COM for Continuous and hybrid models

Post by shooltz[BayesFusion] »

How do I set up the model so that I can get this discretized beliefs from the continuous node?
The only option is to have an extra node which is slightly easier to create. In the attached model. the 'DiscEnforcer' node is a CPT which is a child of the beta distribution. Its probability table contains uniform distributions and setting any evidence on this node will cause SMILE to switch from forward sampling to discretization (this happen when there's an evidence in the node with one or more parents). Using this approach you'll be able to read the discretized beliefs directly from the beta distribution node.

We did not anticipate the situation where user prefers the discretized beliefs over a sample set, so there's no option in SMILE or SMILE.COM to enforce discretization directly. Is there any specific problem you want to solve by always using the results from the discretization?
Attachments
BetaDistribution_EnforcedDiscretization.zip
(1.36 KiB) Downloaded 308 times
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: SMILE.COM for Continuous and hybrid models

Post by jdtoellner »

That makes getting the distribution easier however, when I change alpha and beta I can see the distribution change in GeNie when it's sampled. I am able to read the discretized beliefs directly from the discretized distribution node however the distribution never changes even when I change alpha and beta. This happens both in Excel and in GeNie.
BetaDistribution_EnforcedDiscretization.zip
(200.42 KiB) Downloaded 270 times
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: SMILE.COM for Continuous and hybrid models

Post by jdtoellner »

Regarding your question about discretization. I would like to be able to get beliefs from a continuous node. I'm developing an application where I'm computing joint continuous probabilities and I'm finding its better to display them as a probability distribution functions rather than just providing the mean and standard deviation of the distribution.

I'll send you the Excel application I'm developing. It involves estimates for work to be done and I'm trying to depict the estimates as a range Over some kind of distribution as opposed to a discrete estimate. Estimates as you know will have some variance. Depicting them as distributions gives the user some intuition as to the range of possibilities.

I'm finding the smile.com feature extremely useful. I can do manipulations, in excel that make it very powerful. It's a great addition to your product suite.
shooltz[BayesFusion]
Site Admin
Posts: 1314
Joined: Mon Nov 26, 2007 5:51 pm

Re: SMILE.COM for Continuous and hybrid models

Post by shooltz[BayesFusion] »

Thanks for the additional information re: your app.

We're looking into the issue with beta distribution not following the change in the parameters set in alpha when enforced discretization is on. At this point it looks like a bug. We expect to have a fix/updated binaries soon. For now, please use your original approach with the extra CPT node doing the discretization.
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: SMILE.COM for Continuous and hybrid models

Post by jdtoellner »

I set up a network with a discretizernode. I noticed that when I discretize the continuous node I can no longer get the mean and standard deviation.

I want all three: Mean, standard deviation, and discretized beliefs.

In order to do that I'd need to set then clear evidence for the discretizer node.

Am I understanding this correctly?
shooltz[BayesFusion]
Site Admin
Posts: 1314
Joined: Mon Nov 26, 2007 5:51 pm

Re: SMILE.COM for Continuous and hybrid models

Post by shooltz[BayesFusion] »

If you want mean/stddev, then you'll need to run without evidence in nodes with parents. The approach you described would work, however, as mentioned earlier in this thread, there's a problem with the discretization when you change the alpha parameter by setting the evidence. Basically, the discretized CPT calculated for the 'beta distribution' node is valid for alpha=5 (the original value) and does not work correctly when you set evidence in alpha.

While we work to solve this issue, I'd recommend using your original approach: the network with a special CPT node reflecting the sampled value of 'beta distribution' node. This should give you mean, stddev and discretized beliefs for any alpha/beta parameter choice selected by SetEvidence.
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: SMILE.COM for Continuous and hybrid models

Post by jdtoellner »

Here's another version that takes mean and standard deviation as input rather than alpha and beta, which is more intuitive.
BetaDistribution.xlsm
(28.67 KiB) Downloaded 384 times
jdtoellner
Posts: 71
Joined: Mon Aug 01, 2016 9:45 pm

Re: SMILE.COM for Continuous and hybrid models

Post by jdtoellner »

While I look forward to your bugfix but I think I will use my approach where I create a special CPT node reflecting the sampled value of 'beta distribution' node. The discretizer node is a good approach bit I'd rather not have to set and clear evidence just to get discrete beliefs.
shooltz[BayesFusion]
Site Admin
Posts: 1314
Joined: Mon Nov 26, 2007 5:51 pm

Re: SMILE.COM for Continuous and hybrid models

Post by shooltz[BayesFusion] »

While I look forward to your bugfix but I think I will use my approach where I create a special CPT node reflecting the sampled value of 'beta distribution' node.
I definitely agree; sampling gives you much closer approximation.
Post Reply