NodeExpectedUtils {RNetica} | R Documentation |
Calculates the expected utility for a decision node. That is for each state of the decision node it calculates the expected utility if that state is chosen.
NodeExpectedUtils(node)
node |
An active |
This solves a decision problem. In an influence diagram (decision net), one decision node is considered a predecessor if its value is known at the time when a decision is made. The compilation process for a decision net will fill in predecessor relationships when they are implied by paths through nature nodes. Decision networks are typically “solved” by working backwards in time from the last decision to the first.
The expression NodeExpectedUtils(node)
will only return a
meaningful result if either, node represents the first
sequential decision, or all prior decisions have been made (and their
values are known).
This should return a named numeric vector of length
NodeNumStates(node)
with each element corresponding to
one of the states of node
.
This function is currently returning an internal Netica error. Do not use until I get clarification from Norsys.
Russell Almond
http://norsys.com/onLineAPIManual/index.html: GetNodeExpectedUtils_bn()
For more about decision nets: http://www.norsys.com/WebHelp/NETICA/X_Decision_Problems.htm
NodeKind()
, NodeValue()
,
NodeExpectedValue()
sess <- NeticaSession() startSession(sess) ## Read the RTI network from the library. rti <- ReadNetworks(file.path(library(help="RNetica")$path, "sampleNets","CostOfTesting.dne"), session=sess) ## The two decision nodes Test <- NetworkFindNode(rti,"Test") Instruction <- NetworkFindNode(rti,"Instruction") ## Network must be compiled before analysis: CompileNetwork(rti) NodeExpectedUtils(Test) ## Not run: ## This produces an error because Test is not set. NodeExpectedUtils(Instruction) ## End(Not run) NodeFinding(Test) <- "Yes" NodeExpectedUtils(Instruction) DeleteNetwork(rti) stopSession(sess)