changes.diff

J. Moringen, 11/24/2015 12:14 PM

Download (6.93 KB)

View differences:

5 5
option java_outer_classname = "BayesNetworkType";
6 6

  
7 7
/**
8
 * The BayesNetwork message holds the description of a bayesian network
9
 * following the XMLBIF Format:
8
 * Description of a Bayesian network following the XMLBIF Format::
10 9
 *
11 10
 *   <!DOCTYPE BIF [
12 11
 *     <!ELEMENT BIF ( NETWORK )*>
......
23 22
 *     <!ELEMENT PROPERTY (#PCDATA)>
24 23
 *     ]>
25 24
 *
26
 * See: http://www.cs.cmu.edu/afs/cs/user/fgcozman/www/Research/InterchangeFormat/
25
 * @see http://www.cs.cmu.edu/afs/cs/user/fgcozman/www/Research/InterchangeFormat/
27 26
 *
28 27
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
29 28
 */
30 29
message BayesNetwork {
31 30

  
32 31
    /**
33
     * The name of this BayesNetwork
32
     * The name of the network.
34 33
     */
35 34
    optional string name = 1;
36 35

  
37 36
    /**
38 37
     * Arbitrary properties associated with the network.
39 38
     */
40
    repeated string property = 2;
39
    repeated .rst.generic.KeyValuePair property = 2;
41 40

  
42 41
    /**
43
     * List of the BayesVariables describing the nodes of the network in
44
     * combination with theyr connectivity and conditional probability
45
     * distribution.
42
     * List of the BayesVariables describing the nodes of the network
43
     * in combination with their connectivity and conditional
44
     * probability distribution.
46 45
     */
47 46
    repeated BayesVariable variable = 3;
48 47

  
6 6
option java_outer_classname = "BayesNetworkEvidenceType";
7 7

  
8 8
/**
9
 * The BayesNetworkEvidence holds a the states of all observed variables of
10
 * a BayesNetwork at one timepoint. The Corresponding network can be attached to.
9
 * The states of all observed variables of a @ref BayesNetwork at one
10
 * point in time.
11
 *
12
 * The corresponding network can be included in the message.
11 13
 *
12 14
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
13 15
 */
14 16
message BayesNetworkEvidence {
15 17

  
16 18
    /**
17
     * A VariableState is one observation of one BayesVariable.
19
     * One observation of a @ref BayesVariable.
18 20
     */
19 21
    message VariableState {
20 22

  
21 23
        /**
22
         * The name of the observed BayesVariable.
24
         * The name of the observed variable.
23 25
         */
24 26
        required string variable = 1;
25 27

  
26 28
        /**
27
         * The observed state of the BayesVariable.
29
         * The observed state of the variable.
28 30
         */
29 31
        required string state = 2;
30 32

  
31 33
    }
32 34

  
33 35
    /**
34
     * The corresponding BayesNetwork.
36
     * The corresponding @ref BayesNetwork.
35 37
     */
36 38
    optional BayesNetwork network = 1;
37 39

  
......
41 43
    optional timing.Timestamp time = 2;
42 44

  
43 45
    /**
44
     * Number of microseconds this evidence was observed..
46
     * Number of microseconds this evidence was observed for.
45 47
     */
46 48
    // @unit(microsecond)
47 49
    optional uint64 duration_microseconds = 4;
48 50

  
49 51
    /**
50
     * A set of observed VariableStates.
52
     * A set of observed variable states.
51 53
     */
52 54
    repeated VariableState observations = 3;
53 55

  
3 3
option java_outer_classname = "BayesVariableType";
4 4

  
5 5
/**
6
 * BayesVariable used in a BayesNetwork.
7
 * Describes a variable with its possible outcomes.
6
 * Variable for use in a @ref BayesNetwork describing  possible outcomes.
8 7
 *
9 8
 * @author Viktor Richter <vrichter@techfak.uni-bielefeld.de>
10 9
 */
......
16 15
    enum Type {
17 16

  
18 17
        /**
19
         * A Simple Variable in the BayesNetwork representing a world state.
18
         * A simple variable in the @ref BayesNetwork representing a
19
         * world state.
20 20
         */
21 21
        NATURE = 1;
22 22

  
......
29 29
         * Represents the quality or benefit of a decision.
30 30
         */
31 31
        UTILITY = 3;
32

  
32 33
    }
33 34

  
34 35
    /**
35
     * The name of the Variable. This has to be unique in a bayes Network.
36
     * The name of the variable.
37
     *
38
     * This has to be unique in a @ref BayesNetwork.
36 39
     */
37 40
    optional string name = 1;
38 41

  
39 42
    /**
40
     * The Type of the Variable.
43
     * The type of the variable.
41 44
     */
42 45
    optional Type type = 2;
43 46

  
......
49 52
    /**
50 53
     * Arbitrary properties associated with the variable.
51 54
     */
52
    repeated string property = 4;
55
  repeated .rst.generic.KeyValuePair property = 4;
53 56

  
54 57
    /**
55
     * The variables on which state this BayesVariable depends.
58
     * Names of the variables on which this variable depends.
56 59
     */
57 60
    repeated string parents = 5;
58 61

  
59 62
    /**
60
     * The conditional probability table describing the probability
61
     * of each outcome of this variable for each combination of the
62
     * parents states.
63
     * The conditional probability table (cpt) describing the
64
     * probability of each outcome of this variable for each
65
     * combination of the parents states.
63 66
     *
64 67
     * The cpt holds the probability values for the variable outcomes
65 68
     * in the order \f$ v_1, \dots, v_n, v_0 \f$ with the value
66 69
     * permutation from right to left.
67 70
     *
68
     * \verbatim
69
     *  An example with three binary variables would look the following way:
71
     * An example with three binary variables would look the following
72
     * way:
70 73
     *
71
     *  | parent1 | parent2 | variable | position in table |
72
     *  ----------------------------------------------------
73
     *  |    0    |    0    |     0    |         0         |
74
     *  |    0    |    0    |     1    |         1         |
75
     *  |    0    |    1    |     0    |         2         |
76
     *  |    0    |    1    |     1    |         3         |
77
     *  |    1    |    0    |     0    |         4         |
78
     *  |    1    |    0    |     1    |         5         |
79
     *  |    1    |    1    |     0    |         6         |
80
     *  |    1    |    1    |     1    |         7         |
81
     *  \endverbatim
74
     * | parent1 | parent2 | variable | position in table |
75
     * ----------------------------------------------------
76
     * |    0    |    0    |     0    |         0         |
77
     * |    0    |    0    |     1    |         1         |
78
     * |    0    |    1    |     0    |         2         |
79
     * |    0    |    1    |     1    |         3         |
80
     * |    1    |    0    |     0    |         4         |
81
     * |    1    |    0    |     1    |         5         |
82
     * |    1    |    1    |     0    |         6         |
83
     * |    1    |    1    |     1    |         7         |
82 84
     */
83
    repeated double probabilities = 6;
85
    repeated double probabilities = 6 [packed=true];
84 86

  
85 87
}