about summary refs log tree commit diff
path: root/BNW_parameter_learning/Predictmultiple.m
diff options
context:
space:
mode:
authorziejd22018-04-25 16:43:19 -0500
committerziejd22018-04-25 16:43:19 -0500
commit74b673ba4a706085201a5610b938ff98f08f641d (patch)
treecb39006ea1a39499e00dbbb0e0097087a4567031 /BNW_parameter_learning/Predictmultiple.m
parenta781cb1ff2e7ae6de0f686bd02cd279261485b1e (diff)
downloadBNW-74b673ba4a706085201a5610b938ff98f08f641d.tar.gz
Bug fixes, code comments, and minor changes
Diffstat (limited to 'BNW_parameter_learning/Predictmultiple.m')
-rw-r--r--BNW_parameter_learning/Predictmultiple.m22
1 files changed, 18 insertions, 4 deletions
diff --git a/BNW_parameter_learning/Predictmultiple.m b/BNW_parameter_learning/Predictmultiple.m
index 781c64a4..019488a3 100644
--- a/BNW_parameter_learning/Predictmultiple.m
+++ b/BNW_parameter_learning/Predictmultiple.m
@@ -1,4 +1,18 @@
 function Predictmultiple(pre)

+% Predictmultiple is used when predicting the impact of entering

+%    evidence on the network. The 'multiple' part refers to 

+%    it working when evidence for multiple nodes is entered.

+%

+% The input is 'pre'-- the prefix for the network and data

+%      in BNW. It reads information from several files from BNW. 

+%

+% The output is ???net_figure_new.txt. It also calls 

+%      writeParameters_ev to write the parameter file.

+%

+% It is called by the run_octave_evd file in the 'sourcecodes' directory.

+

+

+

 dfile=strcat(pre,'structure_input.txt');

 sfile=dfile;

 dfile=strcat(pre,'continuous_input.txt');

@@ -28,14 +42,14 @@ mapfile = strcat(pre,'map.txt');
 fmap = fopen(mapfile,'r');

 for i=1:nnodes

     buffer = fgetl(mapfile);

-    temp = cell(1,4);

-    for j=1:4

+    temp = cell(1,3);

+    for j=1:3

         [next,buffer] = strtok(buffer);

         temp{j} = next;

     end

     labels_orig{i} = temp{1};

-    means_orig{i} = str2num(temp{4});

-    stdevs_orig{i} = str2num(temp{3});

+    means_orig{i} = str2num(temp{3});

+    stdevs_orig{i} = str2num(temp{2});

 end

 fclose(fmap);