ripple-down-rules 0.0.2__py3-none-any.whl → 0.0.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,55 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: ripple_down_rules
3
- Version: 0.0.2
4
- Summary: Implements the various versions of Ripple Down Rules (RDR) for knowledge representation and reasoning.
5
- Author-email: Abdelrhman Bassiouny <abassiou@uni-bremen.de>
6
- Project-URL: Homepage, https://github.com/AbdelrhmanBassiouny/ripple_down_rules
7
- Keywords: robotics,knowledge,reasoning,representation
8
- Classifier: Programming Language :: Python :: 3
9
- Requires-Python: >=3.8
10
- Description-Content-Type: text/markdown
11
- Requires-Dist: neem_pycram_interface==1.0.167
12
-
13
- # Ripple Down Rules (RDR)
14
-
15
- A python implementation of the various ripple down rules versions, including Single Classification (SCRDR),
16
- Multi Classification (MCRDR), and Generalised Ripple Down Rules (GRDR).
17
-
18
- SCRDR, MCRDR, and GRDR are rule-based classifiers that are built incrementally, and can be used to classify
19
- data cases. The rules are refined as new data cases are classified.
20
-
21
- SCRDR, MCRDR, and GRDR implementation were inspired from the book:
22
- ["Ripple Down Rules: An Alternative to Machine Learning"](https://doi.org/10.1201/9781003126157) by Paul Compton, Byeong Ho Kang.
23
-
24
- ## Installation
25
-
26
- ```bash
27
- sudo apt-get install graphviz graphviz-dev
28
- pip install ripple_down_rules
29
- ```
30
-
31
- ## Example Usage
32
-
33
- Fit the SCRDR to the data, then classify one of the data cases to check if its correct,
34
- and render the tree to a file:
35
-
36
- ```Python
37
- from ripple_down_rules.datastructures import CaseQuery
38
- from ripple_down_rules.rdr import SingleClassRDR
39
- from ripple_down_rules.datasets import load_zoo_dataset
40
- from ripple_down_rules.utils import render_tree
41
-
42
- all_cases, targets = load_zoo_dataset()
43
-
44
- scrdr = SingleClassRDR()
45
-
46
- # Fit the SCRDR to the data
47
- case_queries = [CaseQuery(case, target=target) for case, target in zip(all_cases, targets)]
48
- scrdr.fit(case_queries, animate_tree=True)
49
-
50
- # Render the tree to a file
51
- render_tree(scrdr.start_rule, use_dot_exporter=True, filename="scrdr")
52
-
53
- cat = scrdr.fit_case(all_cases[50], targets[50])
54
- assert cat == targets[50]
55
- ```