SmileX and Clustering algorithm

The engine.
Post Reply
jga
Posts: 6
Joined: Mon Jul 13, 2009 12:23 pm

SmileX and Clustering algorithm

Post by jga »

Hello:

I am using SmileX with Excel. How could I use "Clustering" algorithm with SmileX?

SmileX manual says we can use Lauritzen, Henrion, Pearl, LSampling, SelfImportance, HeuristicImportance and Backsampling. All of them for BN. But not Clusterin.

Thanks very much
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Re: SmileX and Clustering algorithm

Post by shooltz[BayesFusion] »

jga wrote:I am using SmileX with Excel. How could I use "Clustering" algorithm with SmileX?
Lauritzen is clustering.
jga
Posts: 6
Joined: Mon Jul 13, 2009 12:23 pm

Post by jga »

Thanks, very much.

Then How can I explain the difference betwen the results with SmileX and Genie. I could compare the results obtained with Genie and SmileX with the same BN in two cases. With the first BN (very simple, with only 4 nodes) the results were very similar (insignificant difference), but with another BN with 30 nodes aprox. there are differences:

With GENIE: 0,764 - 0,253 - 0,979
With SmileX: 0,686 - 0,287 - 0,945

Is that normal?

Thaks
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

Can you post your 30-node network?
jga
Posts: 6
Joined: Mon Jul 13, 2009 12:23 pm

Post by jga »

I posted it.

In rb.xdsl there are some evidences I use to compare Genie results and SmileX results. The target nodes are T1, T2, T3 and T4.

Thanks
Attachments
rb.xdsl
Bayesian Network (28-nodes)
(105.63 KiB) Downloaded 930 times
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

What exactly was the evidence you used to get the belief discrepancy? The model contains multiple cases.
jga
Posts: 6
Joined: Mon Jul 13, 2009 12:23 pm

Post by jga »

The first case. And the probabilities correspond to T1, T2 and T3.
shooltz[BayesFusion]
Site Admin
Posts: 1457
Joined: Mon Nov 26, 2007 5:51 pm

Post by shooltz[BayesFusion] »

jga wrote:The first case. And the probabilities correspond to T1, T2 and T3.
Can't reproduce that with the following script (run from the command line with 'cscript test.vbs'):

Code: Select all

dim net
set net = CreateObject("SmileX.SmileXCtrl.1")
net.ReadFile "rb.xdsl"
net.SetEvidence "A", "Hombre"
net.SetEvidence "B", "E15_34"
net.SetEvidence "C", "Positivo"
net.SetEvidence "F", "Negativo"
net.SetEvidence "G", "Negativo"
net.SetEvidence "H", "Positivo"
net.SetEvidence "L", "Vida_cama_sillon"
net.SetEvidence "N", "Negativo"
net.SetEvidence "R", "Dificultas_Ronquidos"
net.SetEvidence "S", "Negativo"
net.SetEvidence "V", "Extension_en_respuesta_al_dolor"
net.SetEvidence "X", "Al_dolor"

dim res
res = net.UpdateBeliefs("Lauritzen")
Wscript.Echo "UpdateBeliefs status code:", res

dim b
b = net.GetBeliefs("T1")
Wscript.Echo "T1:", b(0), b(1)
b = net.GetBeliefs("T2")
Wscript.Echo "T2:", b(0), b(1)
b = net.GetBeliefs("T3")
Wscript.Echo "T3:", b(0), b(1)
The beliefs returned are in sync with GeNIe's values.

Code: Select all

T1: 0.235561961436078 0.764438038563923
T2: 0.021294296604007 0.978705703395993
T3: 0.746880495503305 0.253119504496695
Make sure your Excel/VB code checks the return values from the SetEvidence method (should be zero if the call succeeded).
jga
Posts: 6
Joined: Mon Jul 13, 2009 12:23 pm

Post by jga »

I apologise for this mistake, because the states of one node stored in excel must containe some strange character. The returns value of SetEvidence method is -1 in some cases.

Thanks very much and best regards
Post Reply