#10 Why Jtree inference result is not correct?

open
nobody
None
5
2006-02-26
2006-02-26
uml
No

I tried to make inference on a simple MRF2 through
Jtree. But for some queries, Jtree did not return the
correct answer (does not match NaiveInf).

// My MRF2 is as follows:

const int numOfNds = 4;
const int numOfClqs = 4;

int clqSizes[] = {2, 2, 2, 2};

int clq0[] = { 0,1};
int clq1[] = { 1,2};
int clq2[] = { 2,3};
int clq3[] = { 0, 3};
int *clqs[] = { clq0, clq1, clq2, clq3};

float data0[] = {5, 6, 7, 8};
float data1[] = {7, .2, 3, 4};
float data2[] = {4.4, 11, 30, 7};
float data3[] = {.5, 16, 7, 2};
float *data[] = { data0, data1, data2, data3};

CMRF2* pMNet = pnlCreateMNet2(numOfNds, numOfClqs,
clqSizes, clqs, data);

/* My query and the results are as follows: (no
evidence) */
int queryNds[] = {0,2};

Naive: 0.312311
JTree: 0.442804

A big difference.
How can I fix this problem (or it's a bug of JTreeInf
engine?

thanks much,
uml

Discussion


Log in to post a comment.