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 ??
direct evaluation
locating a leaf node
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.
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 ???
so i was wondering is there anyway to find where the leafnode is automaticaly given the measurments ???
- Attachments
-
- HRI6.xdsl
- (1.7 KiB) Downloaded 473 times
[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
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