GraphicalModelLearning.jl
GraphicalModelLearning.jl copied to clipboard
Proposal for Sample Data Structure
For now we assume discrete models. (something) indicates that something is optional, everything else is required.
A Julia data-structure that can be serialized to JSON as follows,
{
"variable_count":<int>,
"alphabet":[<int>,<int>,...,<int>],
("variable_names":[<string>,<string>,...,<string>],)
"samples":[
{"count":<int>, "assignment":[<int>, <int>,...,<int>], ("value":<float>)},
...
]
}
All values in alphabet should be unique. For now we will require the alphabet to be [-1, 1].
The arrays variable_names, alphabet and assignment must all be the same length that is specified by variable_count. All values in assignment should be members of the alphabet.
value can be used to store an evaluation of the given assignment (e.g. the energy in a d-wave sample).
Should variables be numbered from 0..variable_count-1 or 1..variable_count?
it should be 1..variable_count