diff options
| author | ziejd2 | 2018-09-13 23:59:20 -0500 |
|---|---|---|
| committer | ziejd2 | 2018-09-13 23:59:20 -0500 |
| commit | e3f7237ffcb19f19db3b68777b5a94b89e07f66a (patch) | |
| tree | 554a8013776ebeae3e2976074020c09c2d1af8b0 /sourcecodes/network_layout_evd_example.php | |
| parent | a7eb61ff7a09f39bee67014bf24b8919eaccfc19 (diff) | |
| download | BNW-e3f7237ffcb19f19db3b68777b5a94b89e07f66a.tar.gz | |
New parameter learning options
The main change here is in the parameter learning methods. The parameters that are learned at first (i.e., if there is no evidence) are the distributions that are found directly in the data. I had to create or significantly modify several BNT files for this. If there is evidence, the parameters are learned using a Dirichlet prior. This only required a couple of small changes to the BNW parameter learning files.
Diffstat (limited to 'sourcecodes/network_layout_evd_example.php')
| -rw-r--r-- | sourcecodes/network_layout_evd_example.php | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/sourcecodes/network_layout_evd_example.php b/sourcecodes/network_layout_evd_example.php index 3f22064d..56f80a4e 100644 --- a/sourcecodes/network_layout_evd_example.php +++ b/sourcecodes/network_layout_evd_example.php @@ -1,5 +1,7 @@ <?php //include("structuremap.php"); +include("header_batchsearch.inc"); +include("input_validate.php"); function levelmap($inx,$name,$mapdata) { @@ -25,7 +27,7 @@ foreach($leve_l as $l) $dir="./data/"; -$keyval=$_GET["My_key"]; +$keyval=valid_keyval($_GET["My_key"]); $matfile=$dir."$keyval"."net_figure.txt"; @@ -359,10 +361,14 @@ for($i=0;$i<$nnode;$i++) var topping = data.getValue(selectedItem.row, 0); var s = window.prompt('Selected evidence ' + topping + ' for ' + cnode + '. Enter new evidence ', topping ); - - window.location.href = "add_evd_example.php?name=" + cnode + "&evidence=" + s + "&My_key=" + keyv; - - + if (input_check(s)) + { + window.location.href = "add_evd_example.php?name=" + cnode + "&evidence=" + s + "&My_key=" + keyv; + } + else + { + window.location.href = "input_error_no_menu.php"; + } //alert('The user selected ' + topping + topname); } @@ -425,7 +431,14 @@ for($i=0;$i<$nnode;$i++) var topping = data.getValue(selectedItem.row, 0); var s = window.prompt('Selected evidence ' + topping + ' for ' + cnode + '. Enter new evidence ', topping ); - window.location.href = "add_evd_example.php?name=" + cnode + "&evidence=" + s + "&My_key=" + keyv; + if (input_check(s)) + { + window.location.href = "add_evd_example.php?name=" + cnode + "&evidence=" + s + "&My_key=" + keyv; + } + else + { + window.location.href = "input_error_no_menu.php"; + } } } |
