Skip to content

Dataset

wwcohen edited this page Jul 1, 2016 · 3 revisions

A Tensorlog DATASET is given in a file .exam with three or more tab-separated fields, P, X, Y1, ..., Yk, where:

  • P is the functor of some predicate defined in your program, and you plan to learn a function which maps first arguments to second arguments (mode is "P/io")
  • X is an input
  • Y1...Yk are ALL the outputs for X that are considered correct
Eg, this dataset essentially labels match(r1,r2) and match(r1,r1) as positive, and any other fact match(r1,foo) as negative. The constant r3 should only match itself:
 match  r1      r2      r1
 match  r3      r3
 ....

A serialized dataset has extension .dset.

A dataset is also stored as sparse matrixes, but their meaning is relative to a database: if you change the database you must rebuild the dataset.

Clone this wiki locally