## How to calculate the joint distribution

The engine.
snowave
Posts: 15
Joined: Mon Jan 25, 2016 1:27 pm

### How to calculate the joint distribution

Hi, I'm trying to calculate the joint distribution over a subset of the full joint distribution defined by the Bayesian net.
Is there an algorithm/method could do that using SMILE? thanks

Peng

shooltz[BayesFusion]
Posts: 1241
Joined: Mon Nov 26, 2007 5:51 pm

### Re: How to calculate the joint distribution

You can obtain joint probability distributions for some of the subsets in the networks as a side effect of the jointree-based clustering algorithm (the default inference algorithm in SMILE). To enable this feature, use the following DSL_network methods:

Code: Select all

``````void EnableJptStore(bool enable);
int GetJpts(int ofThisNode, std::vector<std::pair<std::vector<int>, const DSL_Dmatrix *> > & jpts) const;``````
You need to enable JPT store with the EnableJptStore(true) first, update your network and read the JPTs with GetJpts. Note that we do not guarantee that node specified as 1st argument in your GetJpts call will be included in any JPT. If there are any JPTs including the specified node, they're returned in the 2nd (output) argument, which is a vector of pairs. The first element of each pair is vector of node handles indexing the second element (the actual JPT matrix).

yeyewy
Posts: 3
Joined: Sat Nov 29, 2014 5:19 am

### Re: How to calculate the joint distribution

Hi,
Thank you very much for providing guidance about how to compute the joint probability distribution of the class nodes (more than 1) given a set of evidence (feature) nodes and a known Bayesian network. Similar questions have been discussed in
http://support.bayesfusion.com/forum/vi ... ence#p3275

I downloaded the jsmile-1.2.1.jar. But I did not find the DSL_network object in this API. I used the Network object, but I did not find the EnableJptStore function there.
Did you change the name of the function? Should I download another version of API?

shooltz[BayesFusion]