direct evaluation

The engine.
Post Reply
s_v1984
Posts: 11
Joined: Wed Feb 04, 2009 3:44 pm

direct evaluation

Post by s_v1984 »

hi i am trying to use smile to get the ExpectedUtility or posteriori by feding some values, i have discretized the parameters in training ... i have manged to set leaf note parameter to 1 here is simple example
DSL_Dmatrix *theMatrix;
theNet.GetNode(HRI)->Definition()->GetDefinition(&theMatrix);
////do some thing to find where in leaf node by desicritizing the ////measurments to find the leaf node

leafnode=......;//some processing

////


theMatrix->Subscript(leafnode)=1;
/// update the network
theNet.UpdateBeliefs();
DSL_sysCoordinates theCoordinates(*theNet.GetNode(HRI)->Value());
double ExpectedUtility=0;
ExpectedUtility = theCoordinates.UncheckedValue();
printf(" Expected Utility = %f\n\n",ExpectedUtility);

i was wondering is there any direct way to do locate the leaf node so i give measurements that i have and the program give me the posteriori ??? rather than me discretizing the value and located which leaf note that belongs to ??
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Post by mark »

Sorry, but I don't understand what you are trying to do. Please elaborate.
s_v1984
Posts: 11
Joined: Wed Feb 04, 2009 3:44 pm

locating a leaf node

Post by s_v1984 »

the question i have is when u create influence diagram, u need to input the measurements which are discritisized, in genie it is easy u just find which leaf node it is located and set that value to 1, but in smile u need to calculate which leaf node to trigger. is there any easy way of locating leaf node given the measurements values??? Cos this gets complicated when u have multiple nodes.
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Post by mark »

Are you asking if it's possible to identify a node if you only know its state names?
s_v1984
Posts: 11
Joined: Wed Feb 04, 2009 3:44 pm

Post by s_v1984 »

i have attached the genei version as an example, so in here i have 2 nodes and one value node which i can measure the expected value if i feed in the "dis" and "DNo" in geni u just locate which node u r measurments fit in then set the value to one but in smile i compute which interval my each measurment is then i need to do theMatrix->Subscript(leafnode)=1;
so i was wondering is there anyway to find where the leafnode is automaticaly given the measurments ???
Attachments
HRI6.xdsl
(1.7 KiB) Downloaded 472 times
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Post by mark »

In SMILE you can use network.FindNode("node-id") to find any node in the network, including leaf nodes. Also, are you sure you want to use theMatrix->Subscript() instead of node->Value()->SetEvidence()?
s_v1984
Posts: 11
Joined: Wed Feb 04, 2009 3:44 pm

Post by s_v1984 »

[quote="mark"]In SMILE you can use network.FindNode("node-id") to find any node in the network, including leaf nodes. Also, are you sure you want to use theMatrix->Subscript() instead of node->Value()->SetEvidence()?[/quote]

well by setting evidence nothing will change on utility node and evidence cannot be set for utility node , any idea how to do that ? thanks
mark
Posts: 179
Joined: Tue Nov 27, 2007 4:02 pm

Post by mark »

You're right in that you cannot set evidence for a utility node, so you'll have to change the utility function by changing the parameters of the utility node.
Post Reply