cplint

cplint is a suite of programs for reasoning with probabilistic logic programs. It contains programs for both inference and learning.

You can find the manual at http://friguzzi.github.io/cplint/.

You can try it online at http://cplint.eu.

Installation

This is an SWI-Prolog pack.

It can be installed with pack_install/1

$ swipl
?- pack_install(cplint).

Requirements

It requires the packs

bddem uses a foreign library and contains the library binaries for 32 and 64 bits Linux, MacOs and 64 bits Windows. If you want to recompile the foreign library you can use

?- pack_rebuild(bdeem).

On 32 and 64 bits Linux this should work out of the box. On 64 bits Windows the library must be rebuilt by hand, see the pack page https://github.com/friguzzi/bddem.

You can upgrade the pack with

$ swipl
?- pack_upgrade(cplint).

Note that the packs on which cplint depends are not upgraded automatically in this case so they need to be upgraded manually.

Example of use

$ cd <pack>/cplint/prolog/examples
$ swipl
?- [coin].
?- prob(heads(coin),P).

Testing the installation

$ swipl
?- [library(cplint_test/test)].
?- test.

Datasets

Other machine learning datasets are available in pack cplint_datasets.

Support

Use the Google group https://groups.google.com/forum/#!forum/cplint.

Prolog files

pack.plShow source
prolog/cplint_test/cplint_test.plShow source
prolog/cplint_test/test.plShow source
prolog/cplint_test/test_cplint_util.plShow source
prolog/cplint_test/test_kbest.plShow source
prolog/cplint_test/test_lemur.plShow source
prolog/cplint_test/test_mc.plShow source
prolog/cplint_test/test_pita.plShow source
prolog/cplint_test/test_pitaind.plShow source
prolog/cplint_test/test_sc.plShow source
prolog/cplint_test/test_viterbi.plShow source
prolog/cplint_util.pl  -- matrixShow source
prolog/examples/abd1.plShow source
prolog/examples/abd1cons1.plShow source
prolog/examples/abd1cons2.plShow source
prolog/examples/abd2.plShow source
prolog/examples/abd3.plShow source
prolog/examples/alarm.plShow source
prolog/examples/arithm.plShow source
prolog/examples/binomial.plShow source
prolog/examples/binomial_user.plShow source
prolog/examples/bitcoin_attack.plShow source
prolog/examples/bitcoin_two_phase.plShow source
prolog/examples/bloodtype.plShow source
prolog/examples/bloodtype_indexc.plShow source
prolog/examples/card.plShow source
prolog/examples/card_body.plShow source
prolog/examples/card_disc.plShow source
prolog/examples/card_disc_body.plShow source
prolog/examples/coin.plShow source
prolog/examples/coin2.plShow source
prolog/examples/coinmc.plShow source
prolog/examples/coinmsw.plShow source
prolog/examples/coinmsw_mc.plShow source
prolog/examples/coinmsw_mc_memo.plShow source
prolog/examples/coinmsw_memo.plShow source
prolog/examples/cora.plShow source
prolog/examples/diabetes.plShow source
prolog/examples/dice.plShow source
prolog/examples/dirichlet_process.plShow source
prolog/examples/dp_chinese.plShow source
prolog/examples/dp_mix.plShow source
prolog/examples/dt_rock_paper_scissors.plShow source
prolog/examples/dt_umbrella.plShow source
prolog/examples/dt_viral.plShow source
prolog/examples/dt_viral_probs.plShow source
prolog/examples/dt_weather.plShow source
prolog/examples/dt_winning.plShow source
prolog/examples/earthquake.plShow source
prolog/examples/epidemic.plShow source
prolog/examples/eruption.plShow source
prolog/examples/eruption_tab.plShow source
prolog/examples/event_calculus.plShow source
prolog/examples/figaro_611.plShow source
prolog/examples/flexprob.plShow source
prolog/examples/fruit.plShow source
prolog/examples/gauss_mean_est.plShow source
prolog/examples/gauss_mean_est_user.plShow source
prolog/examples/gaussian_mixture.plShow source
prolog/examples/gaussian_process.plShow source
prolog/examples/gm_dc.plShow source
prolog/examples/gpl.plShow source
prolog/examples/gpr.plShow source
prolog/examples/h_index.plShow source
prolog/examples/hmm.plShow source
prolog/examples/hmmpos.plShow source
prolog/examples/hmmpos2.plShow source
prolog/examples/indian_gpa.plShow source
prolog/examples/indian_gpadc.plShow source
prolog/examples/iris.plShow source
prolog/examples/iris_c3.plShow source
prolog/examples/jail.plShow source
prolog/examples/kalman_filter.plShow source
prolog/examples/kalman_filter2d.plShow source
prolog/examples/kalman_filtermsw.plShow source
prolog/examples/kbest_coin.plShow source
prolog/examples/kbest_hmm.plShow source
prolog/examples/kbest_mendel.plShow source
prolog/examples/kbest_win.plShow source
prolog/examples/lda.plShow source
prolog/examples/learning/bongard.plShow source
prolog/examples/learning/bongard_fixed.plShow source
prolog/examples/learning/bongard_ind.plShow source
prolog/examples/learning/bongard_initial.plShow source
prolog/examples/learning/bongardkeys.plShow source
prolog/examples/learning/exauc.plShow source
prolog/examples/learning/hmmlearn.plShow source
prolog/examples/learning/mach.plShow source
prolog/examples/learning/multiple_paths_learning.plShow source
prolog/examples/learning/multiple_paths_simple_learning.plShow source
prolog/examples/learning/muta.plShow source
prolog/examples/learning/registration.plShow source
prolog/examples/learning/shop.plShow source
prolog/examples/learning/trains.plShow source
prolog/examples/learning/university.plShow source
prolog/examples/lemur/bongard.plShow source
prolog/examples/lemur/bongardkeys.plShow source
prolog/examples/lemur/mach.plShow source
prolog/examples/lemur/registration.plShow source
prolog/examples/light.plShow source
prolog/examples/map1.plShow source
prolog/examples/map_bn.plShow source
prolog/examples/map_es2.plShow source
prolog/examples/map_es21.plShow source
prolog/examples/map_es2map.plShow source
prolog/examples/map_es2map1.plShow source
prolog/examples/map_es3.plShow source
prolog/examples/markov_chain.plShow source
prolog/examples/markov_chaindb.plShow source
prolog/examples/markov_factor.plShow source
prolog/examples/markov_network.plShow source
prolog/examples/mendel.plShow source
prolog/examples/mendel_indexc.plShow source
prolog/examples/mendelc.plShow source
prolog/examples/meta.plShow source
prolog/examples/metacomb.plShow source
prolog/examples/metamc.plShow source
prolog/examples/mln.plShow source
prolog/examples/monty.plShow source
prolog/examples/monty_simple.plShow source
prolog/examples/multiple_paths.plShow source
prolog/examples/multiple_paths_simple.plShow source
prolog/examples/mvg.plShow source
prolog/examples/nballs.plShow source
prolog/examples/nballsdc.plShow source
prolog/examples/path.plShow source
prolog/examples/pathdb.plShow source
prolog/examples/pcfg.plShow source
prolog/examples/pcfglr.plShow source
prolog/examples/pcfglrdb.plShow source
prolog/examples/pctl_slep.plShow source
prolog/examples/persons.plShow source
prolog/examples/pitavit_coin.plShow source
prolog/examples/pitavit_hmm.plShow source
prolog/examples/pitavit_mendel.plShow source
prolog/examples/pitavit_win.plShow source
prolog/examples/plcg.plShow source
prolog/examples/pre_plcg.plShow source
prolog/examples/prefix.plShow source
prolog/examples/rmc.plShow source
prolog/examples/seven_scientists.plShow source
prolog/examples/ship.plShow source
prolog/examples/simpson.plShow source
prolog/examples/simpsonmc.plShow source
prolog/examples/slp_pcfg.plShow source
prolog/examples/slp_pdcg.plShow source
prolog/examples/sneezing.plShow source
prolog/examples/testdb.plShow source
prolog/examples/threesideddice.plShow source
prolog/examples/threesideddicemc.plShow source
prolog/examples/trigger.plShow source
prolog/examples/truel.plShow source
prolog/examples/uwcse.plShow source
prolog/examples/uwcse3s.plShow source
prolog/examples/uwcse4s.plShow source
prolog/examples/uwcse_indind.plShow source
prolog/examples/uwcse_indinds.plShow source
prolog/examples/uwcsemc.plShow source
prolog/examples/var_obj.plShow source
prolog/examples/var_obj_geom.plShow source
prolog/examples/var_objdb.plShow source
prolog/examples/viral.plShow source
prolog/examples/viralmc.plShow source
prolog/examples/vit_coin.plShow source
prolog/examples/vit_hmm.plShow source
prolog/examples/vit_mendel.plShow source
prolog/examples/vit_win.plShow source
prolog/examples/widget.plShow source
prolog/examples/widgetmsw.plShow source
prolog/highlight.plShow source
prolog/kbest.pl  -- kbestShow source
kbest/3The predicate computes the K most probable explanations of the conjunction of literals Query.Source
kbest/4The predicate computes the K most probable explanations of the conjunction of literals Query.Source
prolog/lemur.pl  -- lemurShow source
prolog/mcintyre.pl  -- mcintyreShow source
prolog/pita.pl  -- pitaShow source
prolog/pitaind.pl  -- pitaindShow source
andc/3Returns A*B in AandB (and in case of idependence).Source
andcnf/3Returns A*B in AandB (and in case of idependence).Source
equalityc/3Returns in P the probability that Variable takes Value.Source
get_var_n/5Returns the index Variable of the random variable associated to rule with index Rule, grouding substitution Substitution and head distribution Probabilities in environment Environment.Source
notc/2Returns 1-A in NotA (negation).Source
onec/1Returns 1.0.Source
or_list_exc/2Returns in P the probability of the disjunction of the random variables whose probabilities are in ListOfProbs assuming exclusiveness.Source
or_list_ind/2Returns in P the probability of the disjunction of the random variables whose probabilities are in ListOfProbs assuming independence.Source
or_list_pitaind/3Returns in P the probability of the disjunction of the random variables whose probabilities are in ListOfProbs.Source
orc_exc/3Returns A + B in AorB (or in case of exclusion).Source
orc_ind/3Returns A + B - A*B in AorB (or in case of independence).Source
prob_bar/2The predicate computes the probability of Query and returns it as a dict for rendering with c3 as a bar chart with a bar for the probability of Query true and a bar for the probability of Query false.Source
prob_bar/3The predicate computes the probability of the Query given Evidence and returns it as a dict for rendering with c3 as a bar chart with a bar for the probability of Query true and a bar for the probability of Query false given Evidence.Source
prob_ind/2The predicate computes the probability of Query If Query is not ground, it returns in backtracking all ground instantiations of Query together with their probabilities.Source
prob_ind/3The predicate computes the probability of Query given Evidence If Query/Evidence are not ground, it returns in backtracking all ground instantiations of Query/Evidence together with their probabilities.Source
s/2The predicate computes the probability of the ground query Query.Source
set_pitaind/2The 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.Source
setting_pitaind/2The predicate returns 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.Source
zeroc/1Returns 0.0.Source
prolog/slipcover.pl  -- slipcoverShow source
prolog/viterbi.pl  -- kbestShow source
viterbi/3The predicate computes the most probable explanation of the conjunction of literals Query.Source
viterbi_all/3The predicate computes the most probable explanation of the conjunction of literals Query.Source