example.org: Illustrate signed interaction graphs.

This commit is contained in:
Sergiu Ivanov 2020-02-23 10:14:32 +01:00
parent 2d0e688425
commit 9f4fae1437
2 changed files with 78 additions and 0 deletions

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by graphviz version 2.43.0 (0)
-->
<!-- Title: G Pages: 1 -->
<svg width="446pt" height="48pt"
viewBox="0.00 0.00 446.16 48.40" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 44.4)">
<title>G</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-44.4 442.16,-44.4 442.16,4 -4,4"/>
<!-- node0 -->
<g id="node1" class="node">
<title>node0</title>
<ellipse fill="none" stroke="black" cx="378.16" cy="-20.2" rx="27" ry="18"/>
<text text-anchor="middle" x="378.16" y="-16.5" font-family="Times-Roman" font-size="14.00">c</text>
</g>
<!-- node0&#45;&gt;node0 -->
<g id="edge1" class="edge">
<title>node0&#45;&gt;node0</title>
<path fill="none" stroke="black" d="M403.61,-26.89C414.19,-27.35 423.16,-25.12 423.16,-20.2 423.16,-15.28 414.19,-13.05 403.61,-13.51"/>
<text text-anchor="middle" x="430.66" y="-16.5" font-family="Times-Roman" font-size="14.00">&#45;1</text>
</g>
<!-- node1 -->
<g id="node2" class="node">
<title>node1</title>
<ellipse fill="none" stroke="black" cx="210.56" cy="-20.2" rx="27" ry="18"/>
<text text-anchor="middle" x="210.56" y="-16.5" font-family="Times-Roman" font-size="14.00">b</text>
</g>
<!-- node0&#45;&gt;node1 -->
<g id="edge2" class="edge">
<title>node0&#45;&gt;node1</title>
<path fill="none" stroke="black" d="M350.86,-20.2C322.78,-20.2 278.85,-20.2 247.63,-20.2"/>
<polygon fill="black" stroke="black" points="247.57,-16.7 237.57,-20.2 247.57,-23.7 247.57,-16.7"/>
<text text-anchor="middle" x="294.25" y="-24" font-family="Times-Roman" font-size="14.00">1</text>
</g>
<!-- node2 -->
<g id="node3" class="node">
<title>node2</title>
<ellipse fill="none" stroke="black" cx="27" cy="-20.2" rx="27" ry="18"/>
<text text-anchor="middle" x="27" y="-16.5" font-family="Times-Roman" font-size="14.00">a</text>
</g>
<!-- node1&#45;&gt;node2 -->
<g id="edge3" class="edge">
<title>node1&#45;&gt;node2</title>
<path fill="none" stroke="black" d="M184.26,-15.3C152.5,-13.06 98.91,-12.86 63.25,-14.7"/>
<polygon fill="black" stroke="black" points="63.02,-11.21 53.25,-15.3 63.44,-18.19 63.02,-11.21"/>
<text text-anchor="middle" x="118.76" y="-3.8" font-family="Times-Roman" font-size="14.00">1</text>
</g>
<!-- node2&#45;&gt;node1 -->
<g id="edge4" class="edge">
<title>node2&#45;&gt;node1</title>
<path fill="none" stroke="black" d="M53.3,-25.1C85.06,-27.35 138.65,-27.55 174.31,-25.7"/>
<polygon fill="black" stroke="black" points="174.54,-29.2 184.31,-25.1 174.12,-22.21 174.54,-29.2"/>
<text text-anchor="middle" x="108.81" y="-29.2" font-family="Times-Roman" font-size="14.00">0</text>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View file

@ -340,6 +340,26 @@ tab
[[file:dots/examplejTo8XT.svg]]
:END:
Here's the signed interaction graph of this network:
#+NAME: simple-bn-sig
#+BEGIN_SRC racket :results silent :var simple-bn=munch-table(simple-bn)
(dotit (build-boolean-signed-interaction-graph (unorg simple-bn)))
#+END_SRC
#+BEGIN_SRC dot :file dots/exampledpQygl.svg :results raw drawer :cmd sfdp :noweb yes
<<simple-bn-sig()>>
#+END_SRC
#+RESULTS:
:RESULTS:
[[file:dots/exampledpQygl.svg]]
:END:
For the interaction a \to b, note indeed that when c is #f, b is
always #f (positive interaction). On the other hand, when c is #t,
b becomes (not a) (negative interaction). Therefore, the influence
of a on b is neither activating nor inhibiting.
* Local Variables :noexport:
# Local Variables: