GraphicalModelLearning.jl icon indicating copy to clipboard operation
GraphicalModelLearning.jl copied to clipboard

Proposal for Sample Data Structure

Open ccoffrin opened this issue 8 years ago • 2 comments

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).

ccoffrin avatar Nov 12 '17 22:11 ccoffrin

Should variables be numbered from 0..variable_count-1 or 1..variable_count?

ccoffrin avatar Nov 13 '17 16:11 ccoffrin

it should be 1..variable_count

ccoffrin avatar Nov 14 '17 18:11 ccoffrin