Package rst.bayesnetwork

Not documented

Messages

digraph message_graph { fontname="Arial"; fontsize=11; stylesheet="../_static/graphs.css"; node [fontsize=11,fontname="Arial"] edge [fontsize=11,fontname="Arial"] "1" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence" TITLE="Structure rst.bayesnetwork.BayesNetworkEvidence" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">BayesNetworkEvidence</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetwork" TITLE="Structure rst.bayesnetwork.BayesNetwork" TARGET="_parent">BayesNetwork</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.network" TITLE="Field rst.bayesnetwork.BayesNetworkEvidence.network" TARGET="_parent" PORT="network">network</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-timing.html#rst.timing.Timestamp" TITLE="Structure rst.timing.Timestamp" TARGET="_parent">Timestamp</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.time" TITLE="Field rst.bayesnetwork.BayesNetworkEvidence.time" TARGET="_parent" PORT="time">time</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.duration_microseconds" TITLE="Field rst.bayesnetwork.BayesNetworkEvidence.duration_microseconds" TARGET="_parent" PORT="duration_microseconds">duration_microseconds</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.VariableState" TITLE="Structure rst.bayesnetwork.BayesNetworkEvidence.VariableState" TARGET="_parent">VariableState</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.observations" TITLE="Field rst.bayesnetwork.BayesNetworkEvidence.observations" TARGET="_parent" PORT="observations">observations</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "6" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.VariableState" TITLE="Structure rst.bayesnetwork.BayesNetworkEvidence.VariableState" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">VariableState</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.VariableState.variable" TITLE="Field rst.bayesnetwork.BayesNetworkEvidence.VariableState.variable" TARGET="_parent" PORT="variable">variable</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetworkEvidence.VariableState.state" TITLE="Field rst.bayesnetwork.BayesNetworkEvidence.VariableState.state" TARGET="_parent" PORT="state">state</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "5" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-timing.html#rst.timing.Timestamp" TITLE="Structure rst.timing.Timestamp" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">Timestamp</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-UINT64.html#UINT64" TITLE="Fundamental UINT64" TARGET="_parent">UINT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-timing.html#rst.timing.Timestamp.time" TITLE="Field rst.timing.Timestamp.time" TARGET="_parent" PORT="time">time</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "2" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetwork" TITLE="Structure rst.bayesnetwork.BayesNetwork" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">BayesNetwork</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetwork.name" TITLE="Field rst.bayesnetwork.BayesNetwork.name" TARGET="_parent" PORT="name">name</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetwork.property" TITLE="Field rst.bayesnetwork.BayesNetwork.property" TARGET="_parent" PORT="property">property</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable" TITLE="Structure rst.bayesnetwork.BayesVariable" TARGET="_parent">BayesVariable</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesNetwork.variable" TITLE="Field rst.bayesnetwork.BayesNetwork.variable" TARGET="_parent" PORT="variable">variable</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "3" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable" TITLE="Structure rst.bayesnetwork.BayesVariable" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/message.svg"></IMG></TD><TD ALIGN="left">BayesVariable</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.name" TITLE="Field rst.bayesnetwork.BayesVariable.name" TARGET="_parent" PORT="name">name</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type" TITLE="Enum rst.bayesnetwork.BayesVariable.Type" TARGET="_parent">Type</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.type" TITLE="Field rst.bayesnetwork.BayesVariable.type" TARGET="_parent" PORT="type">type</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.outcomes" TITLE="Field rst.bayesnetwork.BayesVariable.outcomes" TARGET="_parent" PORT="outcomes">outcomes</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.property" TITLE="Field rst.bayesnetwork.BayesVariable.property" TARGET="_parent" PORT="property">property</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-ASCII-STRING.html#ASCII-STRING" TITLE="Fundamental ASCII-STRING" TARGET="_parent">ASCII-STRING</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.parents" TITLE="Field rst.bayesnetwork.BayesVariable.parents" TARGET="_parent" PORT="parents">parents</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-__rosetta-FLOAT64.html#FLOAT64" TITLE="Fundamental FLOAT64" TARGET="_parent">FLOAT64</TD><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.probabilities" TITLE="Field rst.bayesnetwork.BayesVariable.probabilities" TARGET="_parent" PORT="probabilities">probabilities</TD></TR></TABLE>>,shape=box,style=filled,fillcolor="white"]; "4" [label=<<TABLE BORDER="0"><TR><TD COLSPAN="2" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type" TITLE="Enum rst.bayesnetwork.BayesVariable.Type" TARGET="_parent"><TABLE BORDER="0"><TR><TD ALIGN="right"><IMG SRC="../_static/enum.svg"></IMG></TD><TD ALIGN="left">Type</TD></TR></TABLE></TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type.NATURE" TITLE="Value rst.bayesnetwork.BayesVariable.Type.NATURE" TARGET="_parent">NATURE</TD><TD ALIGN="right" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type.NATURE" TITLE="Value rst.bayesnetwork.BayesVariable.Type.NATURE" TARGET="_parent">1</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type.DECISION" TITLE="Value rst.bayesnetwork.BayesVariable.Type.DECISION" TARGET="_parent">DECISION</TD><TD ALIGN="right" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type.DECISION" TITLE="Value rst.bayesnetwork.BayesVariable.Type.DECISION" TARGET="_parent">2</TD></TR><TR><TD ALIGN="left" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type.UTILITY" TITLE="Value rst.bayesnetwork.BayesVariable.Type.UTILITY" TARGET="_parent">UTILITY</TD><TD ALIGN="right" HREF="../generated/stable/package-rst-bayesnetwork.html#rst.bayesnetwork.BayesVariable.Type.UTILITY" TITLE="Value rst.bayesnetwork.BayesVariable.Type.UTILITY" TARGET="_parent">3</TD></TR></TABLE>>,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" []; }

clearer: should be made invisible via css

Message BayesNetworkEvidence

class rst.bayesnetwork.BayesNetworkEvidence

The states of all observed variables of a BayesNetwork at one point in time.

The corresponding network can be included in the message.

Code author: Viktor Richter <vrichter@techfak.uni-bielefeld.de>

network
Type:rst.bayesnetwork.BayesNetwork

The corresponding BayesNetwork.

time
Type:rst.timing.Timestamp

The time of this observation.

duration_microseconds
Type:UINT64

Unit: microsecond

Number of microseconds this evidence was observed for.

observations
Type:array of rst.bayesnetwork.BayesNetworkEvidence.VariableState

A set of observed variable states.

Download this file

message BayesNetworkEvidence {

    /**
     * One observation of a @ref .BayesVariable.
     */
    message VariableState {

        /**
         * The name of the observed variable.
         */
        required string variable = 1;

        /**
         * The observed state of the variable.
         */
        required string state = 2;

    }

    /**
     * The corresponding @ref .BayesNetwork.
     */
    optional BayesNetwork network = 1;

    /**
     * The time of this observation.
     */
    optional timing.Timestamp time = 2;

    /**
     * Number of microseconds this evidence was observed for.
     */
    // @unit(microsecond)
    optional uint64 duration_microseconds = 4;

    /**
     * A set of observed variable states.
     */
    repeated VariableState observations = 3;

}

Message VariableState

class rst.bayesnetwork.BayesNetworkEvidence.VariableState

One observation of a BayesVariable.

variable
Type:ASCII-STRING

The name of the observed variable.

state
Type:ASCII-STRING

The observed state of the variable.

Download this file

    message VariableState {

        /**
         * The name of the observed variable.
         */
        required string variable = 1;

        /**
         * The observed state of the variable.
         */
        required string state = 2;

    }

Message BayesNetwork

class rst.bayesnetwork.BayesNetwork

Description of a Bayesian network following the XMLBIF Format:

<!DOCTYPE BIF [
  <!ELEMENT BIF ( NETWORK )*>
    <!ATTLIST BIF VERSION CDATA #REQUIRED>
  <!ELEMENT NETWORK ( NAME, ( PROPERTY | VARIABLE | DEFINITION )* )>
  <!ELEMENT NAME (#PCDATA)>
  <!ELEMENT VARIABLE ( NAME, ( OUTCOME |  PROPERTY )* ) >
    <!ATTLIST VARIABLE TYPE (nature|decision|utility) "nature">
  <!ELEMENT OUTCOME (#PCDATA)>
  <!ELEMENT DEFINITION ( FOR | GIVEN | TABLE | PROPERTY )* >
  <!ELEMENT FOR (#PCDATA)>
  <!ELEMENT GIVEN (#PCDATA)>
  <!ELEMENT TABLE (#PCDATA)>
  <!ELEMENT PROPERTY (#PCDATA)>
  ]>

Code author: Viktor Richter <vrichter@techfak.uni-bielefeld.de>

name
Type:ASCII-STRING

Name of the network.

property
Type:array of ASCII-STRING

Arbitrary properties associated with the network.

variable
Type:array of rst.bayesnetwork.BayesVariable

List of variables describing the nodes of the network in combination with their connectivity and conditional probability distribution.

Download this file

message BayesNetwork {

    /**
     * Name of the network.
     */
    optional string name = 1;

    /**
     * Arbitrary properties associated with the network.
     */
    repeated string property = 2;

    /**
     * List of variables describing the nodes of the network in
     * combination with their connectivity and conditional probability
     * distribution.
     */
    repeated BayesVariable variable = 3;

}

Message BayesVariable

class rst.bayesnetwork.BayesVariable

Variable for use in a BayesNetwork describing possible outcomes.

Code author: Viktor Richter <vrichter@techfak.uni-bielefeld.de>

name
Type:ASCII-STRING

The name of the variable.

This has to be unique in a BayesNetwork.

type
Type:rst.bayesnetwork.BayesVariable.Type

The type of the variable.

outcomes
Type:array of ASCII-STRING

The possible outcomes (states) of the variables.

property
Type:array of ASCII-STRING

Arbitrary properties associated with the variable.

parents
Type:array of ASCII-STRING

Names of the variables on which this variable depends.

probabilities
Type:array of 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 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

Download this file

message BayesVariable {

    /**
     * The type of a variable.
     */
    enum Type {

        /**
         * A simple variable in the @ref .BayesNetwork representing a
         * world state.
         */
        NATURE = 1;

        /**
         * Represents an action to choose from.
         */
        DECISION = 2;

        /**
         * Represents the quality or benefit of a decision.
         */
        UTILITY = 3;

    }

    /**
     * The name of the variable.
     *
     * This has to be unique in a @ref .BayesNetwork.
     */
    optional string name = 1;

    /**
     * The type of the variable.
     */
    optional Type type = 2;

    /**
     * The possible outcomes (states) of the variables.
     */
    repeated string outcomes = 3;

    /**
     * Arbitrary properties associated with the variable.
     */
    repeated string property = 4;

    /**
     * Names of the variables on which this variable depends.
     */
    repeated string parents = 5;

    /**
     * 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
     * ======= ======= ======== =================
     */
    repeated double probabilities = 6 [packed=true];

}

Message Type

class rst.bayesnetwork.BayesVariable.Type

The type of a variable.

NATURE
= 1

A simple variable in the BayesNetwork representing a world state.

DECISION
= 2

Represents an action to choose from.

UTILITY
= 3

Represents the quality or benefit of a decision.

Download this file

    enum Type {

        /**
         * A simple variable in the @ref .BayesNetwork representing a
         * world state.
         */
        NATURE = 1;

        /**
         * Represents an action to choose from.
         */
        DECISION = 2;

        /**
         * Represents the quality or benefit of a decision.
         */
        UTILITY = 3;

    }