IDSIA / crema

Crema: Credal Models Algorithms
https://crema-toolbox.readthedocs.io/
GNU Lesser General Public License v3.0
10 stars 4 forks source link

Make credal parsers consistent with UAI endianness #21

Closed rcabanasdepaz closed 4 years ago

rcabanasdepaz commented 4 years ago

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.

davidhuber commented 4 years ago

Committed fixes to dev