This module provides algorithms for learning the structure and the parameters of Hierachical Probabilic Logic Programs (HPLP) from data. Structure learning is done by predicates invention and parameter learning by gradient descent (Backpropagation) or Expectation maximization.
- author
- - Arnaud Nguembang Fadja and Fabrizio Riguzzi
- copyright
- - Arnaud Nguembang Fadja and Fabrizio Riguzzi
- test_hplp(:P:probabilistic_program, +TestFolds:list_of_atoms, -LL:float, -AUCROC:float, -ROC:dict, -AUCPR:float, -PR:dict) is det
- The predicate takes as input in P a probabilistic program,
tests P on the folds indicated in TestFolds and returns the
log likelihood of the test examples in LL, the area under the Receiver
Operating Characteristic curve in AUCROC, a dict containing the points
of the ROC curve in ROC, the area under the Precision Recall curve in AUCPR
and a dict containing the points of the PR curve in PR
- induce_hplp_par(:TrainFolds:list_of_atoms, -P:probabilistic_program) is det
- The predicate learns the parameters of the program stored in the in/1 fact
of the input file using the folds indicated in TrainFolds for training.
It returns in P the input program with the updated parameters.
- inference_hplp(:Query:atom, +Model:constant, -Prob:probabity, -Circuit:Term)
- Performs inference and returns both the probability and the arithmetic circuit of atom in Prob and Circuit respectively.
- sample_hplp(+N, List:list, -Sampled:list, -Rest:list) is det
- Samples N elements from List and returns them in Sampled.
The rest of List is returned in Rest
If List contains less than N elements, Sampled is List and Rest
is [].
- set_hplp(:Parameter:atom, +Value:term) is det
- The predicate sets the value of a parameter
For a list of parameters see
https://github.com/friguzzi/cplint/blob/master/doc/manual.pdf or
http://ds.ing.unife.it/~friguzzi/software/cplint-swi/manual.html
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- induce_hplp(Arg1, Arg2)
- inference_hplp(Arg1, Arg2, Arg3)