From 9c6307e7049339d6f99645dd8320bbdf6a116dc7 Mon Sep 17 00:00:00 2001 From: Maxime Buron <maxime.buron@uca.fr> Date: Tue, 21 Jan 2025 18:04:30 +0100 Subject: [PATCH] correction des exemples --- mar.net | 12 ++++++------ test.net | 42 ++++++++++++++++-------------------------- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/mar.net b/mar.net index e3a978f..d166e0d 100644 --- a/mar.net +++ b/mar.net @@ -22,19 +22,19 @@ node C { ID = "C"; } -node Ia { +node IA { states = (0 1 ); label = "Ia"; ID = "Ia"; } -node Ib { +node IB { states = (0 1 ); label = "Ib"; ID = "Ib"; } -node Ic { +node IC { states = (0 1 ); label = "Ic"; ID = "Ic"; @@ -56,17 +56,17 @@ potential ( C | B ) { ( 0.371633 0.628367)); % B=1 } -potential (Ia) { +potential (IA) { data = ( 0.8 0.2); } -potential ( Ib | A ) { +potential ( IB | A ) { data = (( 0.664707 0.335293) % A=0 ( 0.344864 0.655136)); % A=1 } -potential ( Ic | B ) { +potential ( IC | B ) { data = (( 0.664707 0.335293) % B=0 ( 0.344864 0.655136)); % B=1 diff --git a/test.net b/test.net index 2ea7a86..35c9df2 100644 --- a/test.net +++ b/test.net @@ -1,52 +1,42 @@ - net { - name = unnamedBN; + name = mar; software = "aGrUM 1.17.1"; node_size = (50 50); } -node B { - states = (0 1 ); - label = "B"; - ID = "B"; -} - node A { states = (0 1 ); label = "A"; ID = "A"; } -node Ia { +node B { states = (0 1 ); - label = "Ia"; - ID = "Ia"; + label = "B"; + ID = "B"; } -node Ib { +node IB { states = (0 1 ); - label = "Ib"; - ID = "Ib"; -} - -potential ( B | A ) { - data = - (( 0.515132 0.484868) % A=0 - ( 0.371633 0.628367)); % A=1 + label = "IB"; + ID = "IB"; } potential (A) { - data = ( 0.561407 0.438593); + data = ( 0.6 0.4); } -potential (Ib) { - data = ( 0.8 0.2); +potential ( B | A ) { + data = + (( 0.2 0.8) % A=0 + ( 0.6 0.4)); % A=1 } -potential ( Ia | B ) { + +potential ( IB | A ) { data = - (( 0.664707 0.335293) % B=0 - ( 0.344864 0.655136)); % B=1 + (( 0.7 0.3) % A=0 + ( 0.3 0.7)); % A=1 } -- GitLab