diff options
| author | ziejd2 | 2017-09-28 15:04:40 -0500 |
|---|---|---|
| committer | ziejd2 | 2017-09-28 15:04:40 -0500 |
| commit | 8070dc963753142bb86c4ed698d91fd623ed28e7 (patch) | |
| tree | d0f6dd8fc46a49b819aa55c1a90faa14d8448883 /sourcecodes/bnt-master/docs/param_tieing.html | |
| parent | 7cc31810d53176e805532b2789955f4eedbce6bb (diff) | |
| download | BNW-8070dc963753142bb86c4ed698d91fd623ed28e7.tar.gz | |
BNW using Octave instead of Matlab.
This version of BNW should perform the same as the original version. The only difference is that it uses Octave instead of Matlab when running BayesNet Toolbox during parameter learning. I am calling this BNW_1.02. It can be accessed at: compbio.uthsc.edu/BNW_1.02
Diffstat (limited to 'sourcecodes/bnt-master/docs/param_tieing.html')
| -rw-r--r-- | sourcecodes/bnt-master/docs/param_tieing.html | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/docs/param_tieing.html b/sourcecodes/bnt-master/docs/param_tieing.html new file mode 100644 index 00000000..b426fe30 --- /dev/null +++ b/sourcecodes/bnt-master/docs/param_tieing.html @@ -0,0 +1,47 @@ + +<h2>Example of more complex parameter tieing</h2> + +We now give a more complex pattern of parameter tieing. +(This example is due to Rainer Deventer.) +The structure is as follows: +<p> +<img src="Figures/rainer_tied.gif" height="400"> +<!--<img src="rainer_dbn.jpg" height="600">--> +<p> +Since nodes 2 and 3 in slice 2 (N7 and N8) +have different parents than their counterparts in slice 1 (N2 and N3), +they must be put into different equivalence classes. +Hence we define +<pre> +eclass1 = [1 2 3 4 5]; +eclass2 = [1 6 7 4 5]; +</pre> +The dotted bubbles represent the equivalence classes. +Node 7 is the representative node for equivalence class +6, and node 8 is the rep. for class 7, so we need to write +<pre> +bnet.CPD{6} = xxx_CPD(bnet, 7, xxx); +bnet.CPD{7} = xxx_CPD(bnet, 8, xxx); +</pre> +In general, you can use the following code fragment: +<pre> +eclass = bnet.equiv_class(:); +for e=1:max(eclass) + i = bnet.rep_of_eclass(e); + bnet.CPD{e} = xxx_CPD(bnet,i); +end +</pre> +<!-- +which is equivalent to +<pre> +E = max(eclass); +rep = zeros(1,E); +for e=1:E + mems = find(eclass==e); + rep(e) = mems(1); +end +for e=1:E + bnet.CPD{e} = xxx_CPD(bnet, rep(e)); +end +</pre> +--> |
