Sampling of probablistic logic programs for SWI-Prolog, similar to Fabrizio Riguzzi's MCINTYRE (2013): http://mcs.unife.it/~friguzzi/Papers/Rig13-FI-IJ.pdf
For information regarding approximate inference via Gibbs sampling / Markov Chain Monte Carlo (MCMC) sampling, see An Analysis of Gibbs Sampling for Probabilistic Logic Programs or A Comparison of MCMC Sampling for Probabilistic Logic Programming (p. 19-29).
swipl
montecarlo
module, e. g. via [montecarlo].
montecarlo('input.pl', Query, P).
, where the first parameter denotes the path to a PLP object program
and the second denotes the query to be sampled. After successful sampling, P will contain the sampled probability
of Query being true under the given input.
[dir] examples |
montecarlo.pl | ||
---|---|---|
montecarlo/3 | Alias of montecarlo/3 with empty options. | |
montecarlo/4 | Start a Monte Carlo sampling process. | |
sampler.pl | ||
load_program/1 | Load the PLP under the given File source and transform it's content for future sampling. | |
sample_goal/1 | Assuming a suitable object program has already been transformed via load_program, take a sample of the given Query. | |
sample_goal_gibbs/2 | Assuming a suitable object program has already been transformed via load_program, take a sample of the given Query via Gibbs-Sampling as detailed in https://ceur-ws.org/Vol-2678/paper12.pdf. | |
unload_program/0 | Cleanup environment state (usually after running a sampling process to completion). | |
test.pl | ||
mc_test/3 | Alias of mc_test/4 with empty options. | |
mc_test/4 | Run a single test. | |
mc_tests/0 | Run manual tests. | |
mc_tests/1 | Run manual tests, specifying the directory test files are contained in. |