.. _package-rst-bayesnetwork:
==========================
Package rst.bayesnetwork
==========================
*Not documented*
Messages
========
.. container:: mess4ge-multi
.. container:: mess4ge-graph
.. digraph:: message_graph
fontname="Arial";
fontsize=11;
stylesheet="../_static/graphs.css";
node [fontsize=11,fontname="Arial"]
edge [fontsize=11,fontname="Arial"]
"1" [label=<
| BayesNetworkEvidence |
|
BayesNetwork | network |
Timestamp | time |
UINT64 | duration_microseconds |
VariableState | observations |
>,shape=box,style=filled,fillcolor="white"];
"6" [label=< | VariableState |
|
ASCII-STRING | variable |
ASCII-STRING | state |
>,shape=box,style=filled,fillcolor="white"];
"5" [label=< | Timestamp |
|
UINT64 | time |
>,shape=box,style=filled,fillcolor="white"];
"2" [label=< | BayesNetwork |
|
ASCII-STRING | name |
ASCII-STRING | property |
BayesVariable | variable |
>,shape=box,style=filled,fillcolor="white"];
"3" [label=< | BayesVariable |
|
ASCII-STRING | name |
Type | type |
ASCII-STRING | outcomes |
ASCII-STRING | property |
ASCII-STRING | parents |
FLOAT64 | probabilities |
>,shape=box,style=filled,fillcolor="white"];
"4" [label=< | Type |
|
NATURE | 1 |
DECISION | 2 |
UTILITY | 3 |
>,shape=box,style=filled,fillcolor="white"];
"1" -> "6" [];
"1":observations -> "6" [];
"1":time -> "5" [];
"1":network -> "2" [];
"2":variable -> "3" [];
"3" -> "4" [];
"3":type -> "4" [];
.. container:: mess4ge-list
.. container:: messages
* :ref:`BayesNetworkEvidence `
* :ref:`BayesNetwork `
* :ref:`BayesVariable `
.. container:: clearer
clearer: should be made invisible via css
.. _message-rst-bayesnetwork-bayesnetworkevidence:
Message BayesNetworkEvidence
----------------------------
.. container:: message-rst-bayesnetwork-bayesnetworkevidence-multi
.. container:: message-rst-bayesnetwork-bayesnetworkevidence-documentation
.. py:class:: rst.bayesnetwork.BayesNetworkEvidence
The states of all observed variables of a :py:class:`BayesNetwork ` at one point in time.
The corresponding network can be included in the message.
.. codeauthor:: Viktor Richter
.. py:attribute:: network
:type: :py:class:`rst.bayesnetwork.BayesNetwork`
The corresponding :py:class:`BayesNetwork `.
.. py:attribute:: time
:type: :py:class:`rst.timing.Timestamp`
The time of this observation.
.. py:attribute:: duration_microseconds
:type: :py:class:`UINT64`
**Unit**: microsecond
Number of microseconds this evidence was observed for.
.. py:attribute:: observations
:type: array of :py:class:`rst.bayesnetwork.BayesNetworkEvidence.VariableState`
A set of observed variable states.
.. container:: message-rst-bayesnetwork-bayesnetworkevidence-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesNetworkEvidence.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesNetworkEvidence.proto
:lines: 16-56
:language: protobuf
:emphasize-lines: 23-23,28-28,34-34,39-39
.. _message-rst-bayesnetwork-bayesnetworkevidence-variablestate:
Message VariableState
---------------------
.. container:: message-rst-bayesnetwork-bayesnetworkevidence-variablestate-multi
.. container:: message-rst-bayesnetwork-bayesnetworkevidence-variablestate-documentation
.. py:class:: rst.bayesnetwork.BayesNetworkEvidence.VariableState
One observation of a :py:class:`BayesVariable `.
.. py:attribute:: variable
:type: :py:class:`ASCII-STRING`
The name of the observed variable.
.. py:attribute:: state
:type: :py:class:`ASCII-STRING`
The observed state of the variable.
.. container:: message-rst-bayesnetwork-bayesnetworkevidence-variablestate-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesNetworkEvidence.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesNetworkEvidence.proto
:lines: 21-33
:language: protobuf
:emphasize-lines: 6-6,11-11
.. _message-rst-bayesnetwork-bayesnetwork:
Message BayesNetwork
--------------------
.. container:: message-rst-bayesnetwork-bayesnetwork-multi
.. container:: message-rst-bayesnetwork-bayesnetwork-documentation
.. py:class:: rst.bayesnetwork.BayesNetwork
Description of a Bayesian network following the XMLBIF Format::
]>
.. seealso::
NIL
http://www.cs.cmu.edu/afs/cs/user/fgcozman/www/Research/InterchangeFormat/
.. codeauthor:: Viktor Richter
.. py:attribute:: name
:type: :py:class:`ASCII-STRING`
Name of the network.
.. py:attribute:: property
:type: array of :py:class:`ASCII-STRING`
Arbitrary properties associated with the network.
.. py:attribute:: variable
:type: array of :py:class:`rst.bayesnetwork.BayesVariable`
List of variables describing the nodes of the network in
combination with their connectivity and conditional probability
distribution.
.. container:: message-rst-bayesnetwork-bayesnetwork-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesNetwork.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesNetwork.proto
:lines: 29-48
:language: protobuf
:emphasize-lines: 6-6,11-11,18-18
.. _message-rst-bayesnetwork-bayesvariable:
Message BayesVariable
---------------------
.. container:: message-rst-bayesnetwork-bayesvariable-multi
.. container:: message-rst-bayesnetwork-bayesvariable-documentation
.. py:class:: rst.bayesnetwork.BayesVariable
Variable for use in a :py:class:`BayesNetwork ` describing possible
outcomes.
.. codeauthor:: Viktor Richter
.. py:attribute:: name
:type: :py:class:`ASCII-STRING`
The name of the variable.
This has to be unique in a :py:class:`BayesNetwork `.
.. py:attribute:: type
:type: :py:class:`rst.bayesnetwork.BayesVariable.Type`
The type of the variable.
.. py:attribute:: outcomes
:type: array of :py:class:`ASCII-STRING`
The possible outcomes (states) of the variables.
.. py:attribute:: property
:type: array of :py:class:`ASCII-STRING`
Arbitrary properties associated with the variable.
.. py:attribute:: parents
:type: array of :py:class:`ASCII-STRING`
Names of the variables on which this variable depends.
.. py:attribute:: probabilities
:type: array of :py:class:`FLOAT64`
The conditional probability table (cpt) describing the
probability of each outcome of this variable for each
combination of the parents states.
The cpt holds the probability values for the variable outcomes
in the order :math:`$ v_1, \dots, v_n, v_0` with the value
permutation from right to left.
An example with three binary variables would look the following
way:
======= ======= ======== =================
parent1 parent2 variable position in table
======= ======= ======== =================
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
1 1 0 6
1 1 1 7
======= ======= ======== =================
.. container:: message-rst-bayesnetwork-bayesvariable-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesVariable.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesVariable.proto
:lines: 11-90
:language: protobuf
:emphasize-lines: 31-31,36-36,41-41,46-46,51-51,78-78
.. _message-rst-bayesnetwork-bayesvariable-type:
Message Type
------------
.. container:: message-rst-bayesnetwork-bayesvariable-type-multi
.. container:: message-rst-bayesnetwork-bayesvariable-type-documentation
.. py:class:: rst.bayesnetwork.BayesVariable.Type
The type of a variable.
.. py:attribute:: NATURE
= 1
A simple variable in the :py:class:`BayesNetwork ` representing a
world state.
.. py:attribute:: DECISION
= 2
Represents an action to choose from.
.. py:attribute:: UTILITY
= 3
Represents the quality or benefit of a decision.
.. container:: message-rst-bayesnetwork-bayesvariable-type-source
:download:`Download this file /home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesVariable.proto>`
.. literalinclude:: //home/jenkins/workspace/rst-manual-0.14-merge-simulator/upstream/RST-0.14.2-Linux/share/rst0.14/proto/sandbox/rst/bayesnetwork/BayesVariable.proto
:lines: 16-34
:language: protobuf
:emphasize-lines: 7-7,12-12,17-17