MCPcopy Index your code
hub / github.com/ML-KULeuven/deepproblog

github.com/ML-KULeuven/deepproblog @v2.0.6

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.6 ↗ · + Follow
643 symbols 2,280 edges 96 files 118 documented · 18% updated 23mo agov2.0.6 · 2024-08-09★ 345
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

DeepProbLog

Unit tests

DeepProbLog is an extension of ProbLog that integrates Probabilistic Logic Programming with deep learning by introducing the neural predicate. The neural predicate represents probabilistic facts whose probabilites are parameterized by neural networks. For more information, consult the papers listed below.

Installation

DeepProbLog can easily be installed using the following command: Make sure the following packages are installed:

pip install deepproblog

Test

To make sure your installation works, install pytest

pip install pytest
````
and run 

python -m deepproblog test


## Requirements

DeepProbLog has the following requirements:
* Python > 3.9
* [ProbLog](https://dtai.cs.kuleuven.be/problog/)
* [PySDD](https://pysdd.readthedocs.io/en/latest/)
* [PyTorch](https://pytorch.org/)
* [TorchVision](https://pytorch.org/vision/stable/index.html)

## Approximate Inference

To use Approximate Inference, we have the following additional requirements
* [PySwip](https://github.com/ML-KULeuven/pyswip) 
    - Use `pip install git+https://github.com/ML-KULeuven/pyswip`
* [SWI-Prolog < 9.0.0](https://www.swi-prolog.org/)
The latter can be installed on Ubuntu with the following commands:

sudo apt-add-repository ppa:swi-prolog/stable sudo apt install swi-prolog=8.4 swi-prolog-nox=8.4 swi-prolog-x=8.4* ```

Experiments

The experiments are presented in the papers are available in the src/deepproblog/examples directory.

Papers

  1. Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, Luc De Raedt: DeepProbLog: Neural Probabilistic Logic Programming. NeurIPS 2018: 3753-3763 (paper)
  2. Robin Manhaeve, Sebastijan Dumancic, Angelika Kimmig, Thomas Demeester, Luc De Raedt: Neural Probabilistic Logic Programming in DeepProbLog. AIJ (paper)
  3. Robin Manhaeve, Giuseppe Marra, Luc De Raedt: Approximate Inference for Neural Probabilistic Logic Programming. KR 2021

License

Copyright 2023 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.

Core symbols most depended-on inside this repo

Shape

Method 409
Function 142
Class 92

Languages

Python100%

Modules by API surface

src/deepproblog/dataset.py58 symbols
src/deepproblog/examples/CLUTRR/data/__init__.py32 symbols
src/deepproblog/utils/stop_condition.py30 symbols
src/deepproblog/engines/prolog_engine/swi_program.py30 symbols
src/deepproblog/utils/__init__.py27 symbols
src/deepproblog/engines/approximate_engine.py24 symbols
src/deepproblog/model.py20 symbols
src/deepproblog/embeddings.py19 symbols
src/deepproblog/engines/prolog_engine/heuristics.py18 symbols
src/deepproblog/engines/builtins.py18 symbols
src/deepproblog/examples/MNIST/data/__init__.py17 symbols
src/deepproblog/engines/exact_engine.py17 symbols

For agents

$ claude mcp add deepproblog \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page