The interaction rule used for ProbLog is the noisy-or construct. If you define multiple rules with the same head, they will be combined as a noisy-or (a determistic or if all heads are deterministic). The strength of the noisy-or parents can be learned using LFI (the inhibition strengths).
Example 1
Given a set of words that appear in documents, we can train a Noisy-OR rule to determine how strongly a word indicates that the document has a certain topic. Make sure to include leak probabilities such that all possible evidence can be linked to a possible world (otherwise ProbLog will return an “Inconsistent Evidence” error).
When using the command line interface of ProbLog we can write the learned program immediately to a file that can be interpreted by problog to perform classification:
$ problog lfi model.pl evidence.pl -O learned_model.pl
Example 2
The absence of a word can also be used as a feature.
Example 3
In case the word predicate includes terms that are not relevant (e.g. the count of the occurences of the word in the document):
The leak probabilities are required such that ProbLog finds ground clauses (evidence is not included as facts in the program). Including these leak probabilities can be done automatically by ProbLog using the --leak-probabilities
flag. This option will include the true evidence as probabilistic facts with the given probability.
$ problog lfi model.pl evidence.pl -O learned_model.pl --leak-probability=0.0001
An alternative solution is to explicitly include the domain for variables in the probabilistic facts. This only works for finite domains, though.