NumberOfHeads is a list of terms, one for each rule. Each term is either
an integer, indicating the number
of head atoms in the rule, or a list [N] where N
is the number of head atoms. In the first case, the parameters of the rule are tunable,
in the latter they are fixed.
Performs EM learning.
Takes as input the Context, information on the rules,
a list of BDDs each representing one example,
the minimum absolute difference EA and relative difference ER between the
log likelihood of examples in two different iterations and the maximum number of iterations
Iterations.
RuleInfo is a list of elements, one for each rule, with are either
- an integer, indicating the number of heads, in which case the parameters of the
corresponding rule should be randomized,
- a list of floats, in which case the parameters should be set to those indicated
in the list and not changed during learning (fixed parameters)
- [a list of floats], in which case the initial values of the parameters should
be set to those indicated
in the list and changed during learning (initial values of the parameters)
Returns the final log likelihood of examples LL, the list of new Parameters
and a list with the final probabilities of each example.
Parameters is a list whose elements are of the form [N,P] where N is the rule
number and P is a list of probabilities, one for each head atom of rule N,
in reverse order.