Skip to main content

ProbLog2: Probabilistic Logic Programming toolbox

Project description

ProbLog

ProbLog 2 is a Probabilistic Logic Programming toolbox. It allows to intuitively build programs that do not only encode complex interactions between a large sets of heterogenous components, but also the inherent uncertainties that are present in real-life situations.

Probabilistic logic programs are logic programs in which some of the facts are annotated with probabilities.

The engine tackles several tasks such as computing the marginals given evidence and learning from (partial) interpretations. ProbLog is a suite of efficient algorithms for various inference tasks. It is based on a conversion of the program and the queries and evidence to a weighted Boolean formula. This allows us to reduce the inference tasks to well-studied tasks such as weighted model counting, which can be solved using state-of-the-art methods known from the graphical model and knowledge compilation literature.

ProbLog is a Python package and can be embedded in Python or Java. Its knowledge base can be represented as Prolog/Datalog facts, CSV-files, SQLite database tables, through functions implemented in the host environment or combinations hereof.

ProbLog 2.1 works out of the box on systems with Python. It has been tested on Mac OSX, Linux and Windows.

Installation

CircleCI codecov

ProbLog supports optional components which can be installed separately. See the file INSTALL for detailed installation instructions.

Python

To install ProbLog, you can use the pip with the following command:

pip install problog

Prerequisites

ProbLog 2.1 requires Python 3.6+. (Python 2.7+ support has been dropped since ProbLog 2.1.0.36.)

Online Editor

You can try out ProbLog without installing it with our online editor.

For example, enter the following ProbLog program for calculating the probability that at least one of two coins (one of which is a bend/biased coin) is head.

% Probabilistic facts:
0.5::heads1.
0.6::heads2.

% Rules:
someHeads :- heads1.
someHeads :- heads2.

% Queries:
query(someHeads).

When you press evaluate, this will result in 0.8, because P(someHeads) = 1 - (1-P(heads1)) (1-P(heads2)) = 1 - (1-0.5) (1-0.6) = 0.8.

Get Started with ProbLog

Tutorial

To get started with ProbLog, follow the ProbLog Tutorial.

Homepage

Visit the ProbLog Homepage.

Documentation

Extensive documentation about ProbLog can be found on our ProbLog documentation on ReadTheDocs.

Papers

You can consult the following paper to get an introduction to ProbLog:

Inference and learning in probabilistic logic programs using weighted Boolean formulas, Daan Fierens, Guy Van den Broeck, Joris Renkens, Dimitar Shterionov, Bernd Gutmann, Ingo Thon, Gerda Janssens, and Luc De Raedt. Theory and Practice of Logic Programming, 2015.

ProbLog: A probabilistic Prolog and its application in link discovery, L. De Raedt, A. Kimmig, and H. Toivonen, Proceedings of the 20th International Joint Conference on Artificial Intelligence (IJCAI-07), Hyderabad, India, pages 2462-2467, 2007.

Many other papers and information about ProbLog can be found in our ProbLog publication list.

License

Copyright 2015 KU Leuven, DTAI Research Group

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

problog-2.2.9.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

problog-2.2.9-py3-none-any.whl (2.0 MB view details)

Uploaded Python 3

File details

Details for the file problog-2.2.9.tar.gz.

File metadata

  • Download URL: problog-2.2.9.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for problog-2.2.9.tar.gz
Algorithm Hash digest
SHA256 c347597a07c4a1a4aee4fc4e674b34d55d4952e94e58ee81f3477146739b90f0
MD5 1f9d0f9471988114322dd09c247e5c05
BLAKE2b-256 8f9a7233bdd320841af2df067eedd7871ebe489681060ab7fb75e6afa24102fa

See more details on using hashes here.

File details

Details for the file problog-2.2.9-py3-none-any.whl.

File metadata

  • Download URL: problog-2.2.9-py3-none-any.whl
  • Upload date:
  • Size: 2.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.23

File hashes

Hashes for problog-2.2.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c4c765e487ff4ff515d22d07a02b6a61cc5f15b95be521252c6b30564f8f1822
MD5 aa9c2f6f72b455c9a0da1e719d88c6ac
BLAKE2b-256 a1776fd9d6a4e7ff252bc0acdebeba6de337598dbd46c541a294f24e9fb67d42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page