Ranking Diagnostic Value in SMILE

The engine.
Post Reply
jidapa.kra
Posts: 2
Joined: Thu Feb 13, 2020 7:34 am

Ranking Diagnostic Value in SMILE

Post by jidapa.kra »

Hi,
My friends and I would like to use the diagnostic values to rank the most to least importance node.
When we use the SMILE package to obtain the Diagnostic Value, we rank it by hand from
how much the node affected the outcome measured by the change if probablity of the outcome.
However, it seems that manully ranking are different from the Test Diagnosis View in GeNIe.
We am quite new to SMILE. Is there any way to obtain the list of nodes ranked from the most to least informative
similar to the Test Diagnosis in GeNIe?

Thank you so much
Jidapa
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: Ranking Diagnostic Value in SMILE

Post by shooltz[BayesFusion] »

The diagnostic functionality is available in SMILE (but not documented in the manual). Which programming language are you using?
jidapa.kra
Posts: 2
Joined: Thu Feb 13, 2020 7:34 am

Re: Ranking Diagnostic Value in SMILE

Post by jidapa.kra »

I am interesting using JAVA
piotr [BayesFusion]
Site Admin
Posts: 60
Joined: Mon Nov 06, 2017 6:41 pm

Re: Ranking Diagnostic Value in SMILE

Post by piotr [BayesFusion] »

To access Diagnostic Values you have to create DiagNetwork object based on existing Network object.

Code: Select all

Network net = new Network();
// do some stuff or load network from file
DiagNetwork diagNetwork = new DiagNetwork(network);
To create a DiagNetwork object, the Network must meet several requirements.
There must be at least one state marked as "NodeDiagType.FAULT".

e.g.

Code: Select all

net.setNodeDiagType("NodeID", Network.NodeDiagType.FAULT);
net.setFaultOutcome("NodeID", "StateID", true);
To get a list of observations like in the GeNIe diagnostic view, you must set the NodeDiagType of nodes as diagnostic observations.

Code: Select all

net.setNodeDiagType("NodeID1", Network.NodeDiagType.OBSERVATION);
net.setNodeDiagType("NodeID2", Network.NodeDiagType.OBSERVATION);
After steps above, you can create DiagNetwork object and get DiagResults by invoking DiagNetwork.update() method.

Code: Select all

DiagNetwork diagNetwork = new DiagNetwork(net);
DiagResults results = diagNetwork.update();
DiagResults contains two other objects - FaultInfo and ObservationInfo - they contain the information that the GeNIe displays in the diagnostic view.

In the attachment I am sending you a simple project based on Maven. Do not forget to import your license in the Example.java file (before calling any JSMILE object), add the path to the native library or put it directly in the project directory and - if you are an academic user - import JSMILE as specified in the documentation (Maven repository is available to business users now).
Attachments
exampleJSMILE.zip
(15.68 KiB) Downloaded 266 times
Post Reply