Reference Manual: DSL valueOfInformation
From DSL
This class is used when computing value of information. To make explanation of the methods easier, let's assume that we want to compute the value of information of observing a set of nodes N before a decision node D is made. Let's also assume that we want the results collected at node P (this is the point of view).
To make the meaning of the point of view clearer, let us imagine an influence diagram represented as a decision tree. The first decision (or observation) will be the root of that tree. This is the usual point of view when computing the value of information. But you can set the point of view somewhere "later", so that the value of information will depend on that first decision node (the root). The point of view P must precede node D in time (i.e. in the temporal order).
To use this class, it has to be linked to a network (using the constructor or the method SetNetwork). Then, a set N has to be specified and a node D has to be designated (using addNode() and setDecision() methods respectively). A point of view P has to be specified as well (using setPointOfView() method). Usually, a point of view will be the first decision node. To find it, a temporal order of the nodes in the network has to be retrieved (using getActions() method). The first decision node is the first node in that order.
Once the value of information is computed, the results can be extracted using the getValues() and getIndexingParents() methods. getValues() will return a matrix (an array) with different values of information indexed by the nodes returned by getIndexingParents(). If the point of view has been set to be the first decision node (the root), there will be no indexing parents and a single, unique value of information. If the point of view is set to be the second decision node, the first decision will be the only indexing parent and there will be as many different values for the value of information as outcomes in that first decision node (one for each branch of the tree).
Methods
- DSL_valueOfInformation(DSL_network *thisOne)
Links ourselves with the network specified in thisOne.
- DSL_network *GetNetwork(void)
Returns the network we are linked to.
- DSL_intArray &GetNodes(void)
Returns the set N. This nodes should be specified by using the method AddNode rather than by directly calling the method Add of the DSL_intArray returned with this method.
- int GetDecision(void)
Returns the decision node D.
- int GetPointOfView(void)
Returns the point of view P.
- DSL_Dmatrix &GetValues(void)
Returns a matrix containing the value (values) of information.
- DSL_intArray &GetIndexingNodes(void)
Returns a list containing the handles of the nodes that index the value of information (every node between the first one and point of view in the temporal order).
- int SetNetwork(DSL_network *thisOne)
Links ourselves to the network specified in thisOne.
- int AddNode(int thisNode)
Adds thisNode to the set D. You can add as many nodes as you want.
- int RemoveNode(int thisNode)
Removes thisNode from the set D.
- int SetDecision(int thisOne)
Sets thisOne to be the node D.
- int SetPointOfView(int thisOne)
Sets thisOne to be the node P. This node must, in the temporal order, precede node D.
- DSL_intArray &GetDecisions(void)
Returns all the decision nodes of the network in temporal order.
- DSL_intArray &GetActions(void)
Returns all the action nodes of the network in temporal order. An action node is either a decision node or an informational predecessor of a decision node.
