Soft - Virtual Evidence Jsmile

The engine.
Post Reply
panawths
Posts: 3
Joined: Mon Jul 22, 2013 2:30 pm

Soft - Virtual Evidence Jsmile

Post by panawths »

Hello everyone,
i have one simple question about the following code

Code: Select all

try{
		Network net = new Network();
	    net.readFile("C:\\SMALL_NETWORK_2.xdsl"); 	  
	    net.setEvidence("C26", "POSITIVE");	    
	    net.updateBeliefs();	    
	    
	    net.getNode("ICU_ADMISSION");
	    int outcomeIndex; 
	    
	    String[] aSuccessOutcomeIds = net.getOutcomeIds("ICU_ADMISSION");
	    for (outcomeIndex = 0; outcomeIndex < aSuccessOutcomeIds.length; outcomeIndex++)
	      if ("NO".equals(aSuccessOutcomeIds[outcomeIndex]))
	        break;
	    System.out.println(aSuccessOutcomeIds[0]+aSuccessOutcomeIds[1]);
	  
	    double [] aValues;
	    aValues = net.getNodeValue("ICU_ADMISSION");
	    double P_SuccIsFailGivenForeIsGood = aValues[outcomeIndex];	    
	    System.out.println("P(\"ICU_ADMISSION\" = NO | \"C26\" = POSITIVE) = " + P_SuccIsFailGivenForeIsGood);
	    		}
		 catch (SMILEException e) {
		   System.out.println(e.getMessage());
		 }
I thing that posibility P(\"ICU_ADMISSION\" = NO | \"C26\" = NO) is computing.
Is there any way to add a soft-virtual evidence to the incoming node C26 and how is this possible via Java?
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Soft - Virtual Evidence Jsmile

Post by shooltz[BayesFusion] »

Is there any way to add a soft-virtual evidence to the incoming node C26 and how is this possible via Java?
Network.setVirtualEvidence is probably what you're looking for.
panawths
Posts: 3
Joined: Mon Jul 22, 2013 2:30 pm

Re: Soft - Virtual Evidence Jsmile

Post by panawths »

thanks a lot sir!
Post Reply