Summing up utilities

The engine.
Post Reply
Kazu
Posts: 10
Joined: Fri Mar 28, 2008 2:45 pm

Summing up utilities

Post by Kazu »

Dear all,

I have an influence diagram that has a number of utility nodes. I just want to get the sum of the expected utilities. I can do this with GeNIe by introducing a dummy decision node; the decision node shows the sum of the expected utilities.

I want to do the same thing in SMILE. How can I do this?

Thanks for your help in advance.
Kazu
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Summing up utilities

Post by shooltz[BayesFusion] »

Kazu wrote:I have an influence diagram that has a number of utility nodes. I just want to get the sum of the expected utilities. I can do this with GeNIe by introducing a dummy decision node; the decision node shows the sum of the expected utilities.
You'll need MAU or ALU node. In GeNIe, just add new utility node, then draw arcs from existing utilities to new node. Its type will be changed to ALU by GeNIe. It's a linear combination of utilitites. The default weights will be 1.0, so you'll get the sum you're looking for.

The node type in SMILE is DSL_MAU. There's no automatic utility->ALU change at SMILE lever, so you'll need to perform net.AddNode(DSL_MAU, "your_mau_node_id"). The node definition class is DSL_mau (that's lowercase mau after the prefix). Note that this class can represent both weight-based ALU and general expression-based MAU.
Kazu
Posts: 10
Joined: Fri Mar 28, 2008 2:45 pm

Post by Kazu »

Dear Shooltz,

many thanks!

So in the end I need to add one more utility node... (I just wanted to avoid this, since my influence diagram has so many utility nodes that is is cumbersome to add arc by hand.)

Now, I have one comment to the SMILE documentation regarding to this issue.

In SMILE documentation -> Application Programmers Manual -> Node Value, you explain the different types of node values. One of them is DSL_listOfDecisions, which represents the calculated expected utility for each choice of this node.

At the same time, you explain in Application Programmers Manual -> Brief Introduction to Some Simple Classes -> Solving Influence Diagrams -> Global Utility, that the library will automatically assume that the global utility is linearly additive and that all utility nodes have the same weight and will add their values together in order to obtain the global utility.

Combining these two article, I thought it was possible to get the global utility without introducing any "global" utility node that merge all utility nodes. However, this is not the case, right? (This is not a criticism but just a suggestion for modification
:D )

I have played around with the value of decision nodes. As long as influence diagrams have only one utiltiy node, the values of decision nodes correspond to the expected utilities of the utility node for each choice of decision. However, once I introduce more than two utility nodes in a influcence diagram, the value of the decision node becomes zero. What does this value represent?

My code is something like this:

theNet.UpdateBeliefs();
int decision = theNet.FindNode("Decision");
DSL_Dmatrix *theMatrix;
theNet.GetNode(decision)->Value()->GetValue(&theMatrix);
double U_DecisionIsChoice0 = theMatrix->Subscript(0);

Best regards,
Kazu[/quote]
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

I've checked our implementation, which sets zeroes (not ones) as the default weights for ALU nodes are zeroes. This includes the temporary node which is added by an inference algorithm when there are multiple terminal utilities. I'll be fixing this issue soon.

For the moment, please make sure your explicit ALU node has proper weights.
Kazu
Posts: 10
Joined: Fri Mar 28, 2008 2:45 pm

Post by Kazu »

Dear shooltz,

thanks! For the time being, I will follow your suggetsion.

Kazu
Post Reply