pyruleanalyzer 1.0.0__tar.gz
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.
- pyruleanalyzer-1.0.0/LICENSE +21 -0
- pyruleanalyzer-1.0.0/PKG-INFO +38 -0
- pyruleanalyzer-1.0.0/README.md +15 -0
- pyruleanalyzer-1.0.0/pyproject.toml +37 -0
- pyruleanalyzer-1.0.0/pyruleanalyzer/__init__.py +1 -0
- pyruleanalyzer-1.0.0/pyruleanalyzer/rule_classifier.py +2054 -0
- pyruleanalyzer-1.0.0/pyruleanalyzer.egg-info/PKG-INFO +38 -0
- pyruleanalyzer-1.0.0/pyruleanalyzer.egg-info/SOURCES.txt +11 -0
- pyruleanalyzer-1.0.0/pyruleanalyzer.egg-info/dependency_links.txt +1 -0
- pyruleanalyzer-1.0.0/pyruleanalyzer.egg-info/requires.txt +10 -0
- pyruleanalyzer-1.0.0/pyruleanalyzer.egg-info/top_level.txt +1 -0
- pyruleanalyzer-1.0.0/setup.cfg +4 -0
- pyruleanalyzer-1.0.0/setup.py +3 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 GrupoCybersegurancaVirtus
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyruleanalyzer
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Author: GrupoCybersegurancaVirtus
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/GrupoCybersegurancaVirtus/pyruleanalyzer
|
|
7
|
+
Project-URL: Documentation, https://grupocybersegurancavirtus.github.io/pyruleanalyzer/
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.7
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: numpy
|
|
14
|
+
Requires-Dist: pandas
|
|
15
|
+
Requires-Dist: scikit-learn
|
|
16
|
+
Requires-Dist: matplotlib
|
|
17
|
+
Provides-Extra: docs
|
|
18
|
+
Requires-Dist: sphinx; extra == "docs"
|
|
19
|
+
Requires-Dist: sphinx-autobuild; extra == "docs"
|
|
20
|
+
Requires-Dist: sphinx_rtd_theme; extra == "docs"
|
|
21
|
+
Requires-Dist: sphinxcontrib-bibtex; extra == "docs"
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# PyRuleAnalyzer
|
|
25
|
+
|
|
26
|
+
PyRuleAnalyzer is a Python-based tool designed to support rule extraction, analysis, and simplification from decision tree and random forest models. It provides a comprehensive pipeline to generate interpretable models, remove redundancies, and evaluate model accuracy and interpretability.
|
|
27
|
+
|
|
28
|
+
Key functionalities include:
|
|
29
|
+
|
|
30
|
+
- Extracting decision rules from Random Forests and Decision Trees.
|
|
31
|
+
|
|
32
|
+
- Identifying and removing redundant and duplicate rules.
|
|
33
|
+
|
|
34
|
+
- Evaluating initial and simplified models through classification accuracy, confusion matrices, and interpretability metrics.
|
|
35
|
+
|
|
36
|
+
- Computing sparsity and interpretability scores to assess model complexity and understandability.
|
|
37
|
+
|
|
38
|
+
For guides on installation and usage refer to the documentation on https://grupocybersegurancavirtus.github.io/pyruleanalyzer/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# PyRuleAnalyzer
|
|
2
|
+
|
|
3
|
+
PyRuleAnalyzer is a Python-based tool designed to support rule extraction, analysis, and simplification from decision tree and random forest models. It provides a comprehensive pipeline to generate interpretable models, remove redundancies, and evaluate model accuracy and interpretability.
|
|
4
|
+
|
|
5
|
+
Key functionalities include:
|
|
6
|
+
|
|
7
|
+
- Extracting decision rules from Random Forests and Decision Trees.
|
|
8
|
+
|
|
9
|
+
- Identifying and removing redundant and duplicate rules.
|
|
10
|
+
|
|
11
|
+
- Evaluating initial and simplified models through classification accuracy, confusion matrices, and interpretability metrics.
|
|
12
|
+
|
|
13
|
+
- Computing sparsity and interpretability scores to assess model complexity and understandability.
|
|
14
|
+
|
|
15
|
+
For guides on installation and usage refer to the documentation on https://grupocybersegurancavirtus.github.io/pyruleanalyzer/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "pyruleanalyzer"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = ""
|
|
9
|
+
authors = [
|
|
10
|
+
{name = "GrupoCybersegurancaVirtus"}
|
|
11
|
+
]
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
license = "MIT"
|
|
14
|
+
license-files = ["LICENSE"]
|
|
15
|
+
requires-python = ">= 3.7"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"numpy",
|
|
18
|
+
"pandas",
|
|
19
|
+
"scikit-learn",
|
|
20
|
+
"matplotlib"
|
|
21
|
+
]
|
|
22
|
+
classifiers = [
|
|
23
|
+
"Programming Language :: Python :: 3",
|
|
24
|
+
"Operating System :: OS Independent",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.optional-dependencies]
|
|
28
|
+
docs = [
|
|
29
|
+
"sphinx",
|
|
30
|
+
"sphinx-autobuild",
|
|
31
|
+
"sphinx_rtd_theme",
|
|
32
|
+
"sphinxcontrib-bibtex",
|
|
33
|
+
]
|
|
34
|
+
|
|
35
|
+
[project.urls]
|
|
36
|
+
Homepage = "https://github.com/GrupoCybersegurancaVirtus/pyruleanalyzer"
|
|
37
|
+
Documentation = "https://grupocybersegurancavirtus.github.io/pyruleanalyzer/"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .rule_classifier import RuleClassifier, Rule
|