SMILE.NET: ValueOfInfo
From DSL
This class is used when computing value of information. To make explanation of the methods easier, let us 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 us also assume that we want the results collected at node P (this is our 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. That node 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). 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).
[edit] Methods
- ValueOfInfo(Network net)
The constructor.
- void AddNode(int nodeHandle)
void AddNode(String nodeId)
Adds the specified node to the set N. Any number of nodes can be added.
- void RemoveNode(int nodeHandle)
void RemoveNode(String nodeId)
Removes the specified node from the set N.
- int[] GetAllNodes()
Returns the handles of all the nodes from the set N.
- String[] GetAllNodeIds()
Returns the ids of all the nodes from the set N.
- void SetDecision(int nodeHandle)
void SetDecision(String nodeId)
Sets the specified node as the decision node D.
- int GetDecision()
Returns the handle of the decision node D.
- String GetDecisionId()
Returns the id of the decision node D.
- int[] GetAllDecisions()
Returns handles of all the decision nodes of the network in temporal order.
- String[] GetAllDecisionIds()
Returns ids of all the decision nodes of the network in temporal order.
- int[] GetAllActions()
Returns handles of 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.
- String[] GetAllActionIds()
Returns ids of 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.
- void SetPointOfView(int nodeHandle)
void SetPointOfView(String nodeId)
Sets the specified node to be the point of view node P. This node must, in the temporal order, precede the decision node D.
- int GetPointOfView()
Returns the handle of the point of view node P.
- String GetPointOfViewId()
Returns the id of the point of view node P.
- int[] GetIndexingNodes()
Returns handles of nodes that index the value of information (i.e. every node between the first one and the point of view in the temporal order).
- String[] GetIndexingNodeIds()
Returns ids of nodes that index the value of information (i.e. every node between the first one and the point of view in the temporal order).
- double[] GetValues()
Returns an array containing the value (values) of information.
