IDSIA/crema

Make credal parsers consistent with UAI endianness

Closed this issue · 1 comments

In V-CREDAL and H-CREDAL:

UAI format seems to consider a big endian encoding (first variable is the most significant one):

[p(0,0), p(0,1), p(0,2), p(1,0), p(1,1), p(1,2)]

while Crema is the opposite (little endian):

[p(0,0), p(1,0), p(0,1), p(1,1), p(0,2), p(1,2)]

In the file it should be encoded as big endian following the UAI format, but then translated into the crema format. (The current implementation considers that files are in little endian)

About the domain, it seems that the conditioned variable (i.e., variable on the left) is always specified in the last place. For the V-CREDAL and H-credal we should also change this to the UAI style.

NOTE: check the BAYES parser where all this has already been solved.

Committed fixes to dev