about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/SLP/misc/gener_empty_cache.m
diff options
context:
space:
mode:
authorziejd22017-09-28 15:04:40 -0500
committerziejd22017-09-28 15:04:40 -0500
commit8070dc963753142bb86c4ed698d91fd623ed28e7 (patch)
treed0f6dd8fc46a49b819aa55c1a90faa14d8448883 /sourcecodes/bnt-master/SLP/misc/gener_empty_cache.m
parent7cc31810d53176e805532b2789955f4eedbce6bb (diff)
downloadBNW-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/SLP/misc/gener_empty_cache.m')
-rw-r--r--sourcecodes/bnt-master/SLP/misc/gener_empty_cache.m26
1 files changed, 26 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/SLP/misc/gener_empty_cache.m b/sourcecodes/bnt-master/SLP/misc/gener_empty_cache.m
new file mode 100644
index 00000000..6e9669e5
--- /dev/null
+++ b/sourcecodes/bnt-master/SLP/misc/gener_empty_cache.m
@@ -0,0 +1,26 @@
+function cache = gener_empty_cache(N,L)
+% cache = gener_empty_cache(number_of_nodes,lenght_of_cache)
+%
+% exemple for 2 nodes with cache of size 5 :
+%
+% cache =
+%   5   b        0      0      0 --> 1st empty place and b==1 iff the cache is full
+%   0   0        1   -239.12   1 --> 1st familly in the cache (node 1 without parents) calculate with bic
+%   0   0        2   -318.98   1
+%   1   0        2   -189.23   2 --> 3rd familly in the cache (node 2 with 1 as parent) calculate with bayesian
+%   0   1        1   -251.09   1
+%   0   0        0      0      0 --> empty entry
+%   |   |        |      |      |
+%   |   |        |      |      |___> 1 for 'bic' or 2 for 'bayesian'
+%   |   |        |      |__________> score of the familly
+%   |   |        |_________________> son node of the familly
+%   |   |__________________________> ==1 iff node 2 is parent of son node
+%   |______________________________> ==1 iff node 1 is parent of son node
+%
+%
+%
+%  designed by francois.olivier.c.h@gmail.com
+%
+
+cache=zeros(L+1,N+3);
+cache(1,1)=2;
\ No newline at end of file