Skip to content

Commit 65e4bf7

Browse files
authored
Update README.md
1 parent 24bbd76 commit 65e4bf7

File tree

1 file changed

+34
-12
lines changed

1 file changed

+34
-12
lines changed

README.md

Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# PyGol
22
**PyGol** is a novel Inductive Logic Programming(ILP) system based on **Meta Inverse Entailment(MIE)** using Python. MIE is similar to Mode-Directed Inverse Entailment (MDIE) but does not require mode declarations. MIE can be applied to tabular and relational datasets with minimal user intervention or parameter settings. In MIE, each hypothesis clause is derived from a **meta theory** generated automatically from background knowledge. Meta theory can also be viewed as a higher-order language bias that defines the hypothesis space.
33

4-
**PyGol** is a Python library that can be used in Python programs (e.g., Jupyter Notebooks). It can also connect with **SWI-Prolog** via **Pyswip**.
4+
**PyGol** is a Python library that can be used in Python programs (e.g., Jupyter Notebooks). It can also connect with **SWI-Prolog** via **Janus**.
55

66
**PyGol** is free to use for non-commercial research and education. If you use PyGol for research, please cite the paper:
77
```cmd
88
Dany Varghese, Didac Barroso-Bergada, David A. Bohan and Alireza Tamaddoni-Nezhad,
99
Efficient Abductive Learning of Microbial Interactions using Meta Inverse Entailment,
10-
In Proceedings of the 31st International Conference on ILP, Springer, 2022(accepted).
10+
In Proceedings of the 31st International Conference on ILP, Springer, 2022.
1111
```
1212
Anyone wishing to use PyGol for commercial purposes should contact either Dany Varghese([email protected]) or Alireza Tamaddoni-Nezhad([email protected]).
1313

@@ -19,13 +19,12 @@ Anyone wishing to use PyGol for commercial purposes should contact either Dany V
1919
* Meta Inverse Entailment (MIE) for the purpose of **automated data science**
2020

2121
## Using PyGol
22-
**PyGol** package is provided as a **C** code. The shared-object file **pygol.so** runs in Python. The current shared-object file is compiled for **Linux x86_64** systems.
22+
**PyGol** package is provided as a **C** code. The shared-object file **pygol.so** runs in Python. The current shared-object file is compiled for **Mac M1** systems.
2323

24-
For all other systems, you can find the **C** code in the folder **"Code"** and convert it to shared-object by executing the following commands;
24+
For all other systems, you can find the **C** code and convert it to shared-object by executing the **generate_so.py** by following commands;
2525

2626
```cmd
27-
gcc <Python_Environment_Variable> -c -fPIC pygol.c -o pygol.o
28-
gcc pygol.o -shared -o pygol.so
27+
gcc python3 generate_so.py build_ext --inplace
2928
```
3029
## Example Problem
3130
PyGol requires four inputs, either in the form of files or a list
@@ -88,10 +87,10 @@ Train_P, Test_P, Train_N, Test_N=pygol_train_test_split(test_size=0, positive_fi
8887
negative_file_dictionary=N)
8988

9089
#Learning Phase/Training Phase using Python
91-
model= pygol_learn(Train_P, Train_N, max_neg=0, max_literals=3, key_size=1,optimize=False)
90+
model= pygol_learn(Train_P, Train_N, max_neg=0, max_literals=3, key_size=1)
9291
```
9392

94-
### Output from Learning Phase
93+
### Output from learning phase
9594
```
9695
+----------+ Training +----------+
9796
['eastbound(A):-has_car(A,B),closed(B),short(B)']
@@ -116,13 +115,36 @@ model= pygol_learn(Train_P, Train_N, max_neg=0, max_literals=3, key_size=1,opti
116115
| F1 Score | 1 |
117116
+-------------+---+
118117
```
119-
## Learning Settings
118+
119+
##Recursion
120+
121+
PyGol is capable of learning recursive programs where a predicate symbol is present in both the rule's head and its body.
122+
123+
To lean recursive rule, **recursive** and **rule_noise_check** variable should be set as True inside **pygol_learn()**.
124+
125+
```Python
126+
model= pygol.pygol_learn(_ ,_ , ... , rule_noise_check = True, recursive = True)
127+
```
128+
129+
_Please refer (examples/ancestor)_
130+
131+
132+
##Predicate invention
133+
134+
PyGol can also perform automatic predicate invention and for that **pi** varibale should set as True.
135+
136+
```Python
137+
model= pygol.pygol_learn(_ ,_ , ... , rule_noise_check = True, recursive = True)
138+
```
139+
140+
_Please refer (examples/GP)_
141+
142+
## Learning settings
120143
- ILP Learning Approach :- **pygol_learn()**
121144
- ILP Cross-Validation Approach :- **pygol_cross_validation()**
122-
- Dealing with typical data science dataset :- **pygol_auto_learn()**
123-
- Dealing with typical data science dataset(CV) :- **pygol_auto_cross_validation()**
145+
- ILP abduction (Reasoning) :- **pygol_abduction()**
124146

125147
For further information, please find the [manual](https://github.com/danyvarghese/PyGol/blob/debbe3024fda4cfaf33936e76dfd9455e455c39c/Manual_Pygol.pdf).
126148

127-
## Bug Reports and Feature Requests
149+
## Bug reports and feature requests
128150
Please submit all bug reports and feature requests as issues on this GitHub repository.

0 commit comments

Comments
 (0)