Learning interpretable logical rules from examples combining symbolic reasoning with machine learning
Project description
💰 Support This Research - Please Donate!
🙏 If this library helps your research or project, please consider donating to support continued development:
💳 DONATE VIA PAYPAL - CLICK HERE
Inductive Logic Programming
🔍 Learning from examples
Muggleton, S. (1991) - "Inductive logic programming"
📦 Installation
pip install inductive-logic-programming
🚀 Quick Start
import inductive_logic_programming
# Create training examples
examples = [
inductive_logic_programming.Example("parent(tom, bob)", True),
inductive_logic_programming.Example("parent(bob, ann)", True),
inductive_logic_programming.Example("parent(tom, liz)", True),
inductive_logic_programming.Example("parent(bob, pat)", True),
inductive_logic_programming.Example("parent(pat, jim)", True),
inductive_logic_programming.Example("grandparent(tom, ann)", True),
inductive_logic_programming.Example("grandparent(tom, pat)", True),
]
# Use FOIL learner to discover rules
foil = inductive_logic_programming.FOILLearner()
learned_rules = foil.learn(examples)
print("✅ Learned rules:")
for rule in learned_rules:
print(f" {rule}")
# Alternative: Use Progol system
progol = inductive_logic_programming.ProgolSystem()
progol.set_examples(examples)
hypothesis = progol.learn()
print(f"✅ Progol hypothesis: {hypothesis}")
🎓 About the Implementation
Implemented by Benedict Chen - bringing foundational AI research to modern Python.
📧 Contact: benedict@benedictchen.com
📖 Citation
If you use this implementation in your research, please cite the original paper:
Muggleton, S. (1991) - "Inductive logic programming"
📜 License
Custom Non-Commercial License with Donation Requirements - See LICENSE file for details.
💰 Support This Work - Donation Appreciated!
This implementation represents hundreds of hours of research and development. If you find it valuable, please consider donating:
💳 DONATE VIA PAYPAL - CLICK HERE
Your support helps maintain and expand these research implementations! 🙏
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inductive_logic_programming-1.1.0.tar.gz.
File metadata
- Download URL: inductive_logic_programming-1.1.0.tar.gz
- Upload date:
- Size: 39.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5ad9ece8d758b4e0e8035590ffe84c21d357b590a4ca6f3f7dfd26579ec8cfd
|
|
| MD5 |
b9f991a3b57a3d8a92c5d3f20329ff8a
|
|
| BLAKE2b-256 |
71fbdbe4987298ae18adec81f291383ba96ce603ae00562ed2656184e64f9b04
|
File details
Details for the file inductive_logic_programming-1.1.0-py3-none-any.whl.
File metadata
- Download URL: inductive_logic_programming-1.1.0-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b62c65619b761bbda0dd1151f4f3cd6b7521d26cf3a12b888b439b8ad35c2822
|
|
| MD5 |
64a375af74707cb6a4609d8eb69404f4
|
|
| BLAKE2b-256 |
90faec5c7e6e6b4dd7e7a0f333bc08622500179678b254bc0a991426b5c225f0
|