Skip to content

Lumen dirty test #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 163 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 126 commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
dcce87e
Moved code from TestSole
giopaglia Dec 10, 2024
740ce9f
rename minimizer algorithm
giopaglia Dec 10, 2024
caf6009
Fix warnings
giopaglia Dec 10, 2024
163cf81
Add apply_function parameter. It's a bit weird.
giopaglia Dec 10, 2024
cc014eb
minor
giopaglia Dec 10, 2024
92392ab
null commit
Perro2110 Dec 11, 2024
c66bd3b
Minor
giopaglia Dec 11, 2024
40eb6b7
Merge branch 'dev-giominimizer' of github.com:aclai-lab/SolePostHoc.j…
giopaglia Dec 11, 2024
97e6d38
Add test
giopaglia Dec 11, 2024
8391b23
Add notes
giopaglia Dec 11, 2024
f18da83
nothing
Perro2110 Dec 11, 2024
7a0344c
Fix
giopaglia Dec 11, 2024
0fbc99a
Minor
giopaglia Dec 11, 2024
22240d5
Merge branch 'dev-giominimizer' of https://github.com/aclai-lab/SoleP…
Perro2110 Dec 11, 2024
8905b01
minor
giopaglia Dec 11, 2024
1168023
in todo
Perro2110 Dec 11, 2024
570549e
Merge branch 'dev-giominimizer' of https://github.com/aclai-lab/SoleP…
Perro2110 Dec 11, 2024
d49313f
[first try add] lumen
Perro2110 Dec 13, 2024
649c8be
row fix
Perro2110 Dec 14, 2024
3e8e8a4
fix completato
Perro2110 Dec 14, 2024
b69a362
printIO_custom_or_formula da rivedere
Perro2110 Dec 17, 2024
186cf32
PreDecisionSetOn
Perro2110 Dec 18, 2024
e50caed
Add stampa_dnf
giopaglia Dec 18, 2024
d4fb65e
Add InTrees, Bellatrex and Lumen
giopaglia Dec 19, 2024
312ecac
bug fix
Perro2110 Dec 19, 2024
a291f0b
DecisionSet Introduction
Perro2110 Dec 21, 2024
699c582
TwoLevelToRule!
Perro2110 Dec 21, 2024
0d8654b
Abemus DecisionSet
Perro2110 Dec 23, 2024
1310e07
Add Marco to authors
giopaglia Dec 23, 2024
cfd6f9a
Merge remote-tracking branch 'origin/dev-marcominimizer' into dev-gio…
giopaglia Dec 23, 2024
b043f52
fix
Perro2110 Dec 23, 2024
9e45fe0
Merge remote-tracking branch 'origin/dev-marcominimizer' into dev-gio…
giopaglia Dec 23, 2024
2631b3c
Restore types
giopaglia Dec 23, 2024
76e573c
pre Server
Perro2110 Dec 25, 2024
46c4d04
add stat
Perro2110 Dec 25, 2024
326f3a8
antsat -> checkmask
giopaglia Dec 28, 2024
2ef16e2
Merge branch 'dev-giominimizer' into dev-marcominimizer
giopaglia Dec 28, 2024
bcf9ac7
Minor
giopaglia Dec 28, 2024
4380e6f
Minor clean
giopaglia Dec 29, 2024
c44bbf3
Improve function naming
giopaglia Dec 30, 2024
6d3760c
Fix
giopaglia Dec 30, 2024
3e6e850
Improving lumen api and fixing intrees
giopaglia Dec 30, 2024
e349f78
add Fix for perfomance in generation of random combinations
Perro2110 Dec 31, 2024
d1c7455
only for vectPrePostNumber
Perro2110 Jan 2, 2025
62b6746
[FIX TEST]
Perro2110 Jan 2, 2025
09426c3
Fix intrees. Minor clean of LUMEN. Add silent and apply_function para…
giopaglia Jan 4, 2025
6369a24
Fix tests, translate Eng->Ita
giopaglia Jan 4, 2025
32476bb
Add return_info
giopaglia Jan 6, 2025
fc1ca0b
PER FIX
Perro2110 Jan 6, 2025
f2c0bed
NOW WORK SPEC RETURN TO MERGE
Perro2110 Jan 6, 2025
1817865
Merge branch 'FIXSPEC' into dev-giominimizer
Perro2110 Jan 6, 2025
dd0507b
ABEMUS SPECIFICITA CORRETTA E POST MERGE CON LUMEN_INFO
Perro2110 Jan 7, 2025
a9b40c0
Move BA-trees
Perro2110 Jan 7, 2025
f373d20
move readme Lumen from Experimenter
Perro2110 Jan 7, 2025
017335f
Minor
giopaglia Jan 8, 2025
b8bac60
Add README
giopaglia Jan 8, 2025
618d146
Minor
giopaglia Jan 8, 2025
693341f
minimizza_dnf(::Val{:espresso_quine}, formula::TwoLevelDNFFormula)
Perro2110 Jan 9, 2025
47ab9b7
add pina, mod IO
Perro2110 Jan 10, 2025
99a38b0
add other minimizer for test, re-re-name in my_syntaxstring io_formul…
Perro2110 Jan 13, 2025
ed88574
fix move
Perro2110 Jan 13, 2025
958d4f6
mitespress ? , batrees in progress
Perro2110 Jan 18, 2025
079d2a0
ABEMUS SOLEMODEL COME INPUT PER BATREES E DECISION SET COME OUTPUT PE…
Perro2110 Jan 18, 2025
128e0fb
main -> WRAP_batrees
Perro2110 Jan 18, 2025
ebb0e6c
PROGRESS BATREES
Perro2110 Jan 19, 2025
d09ba94
post exp
Perro2110 Jan 20, 2025
de14005
Uniforming extractrules
giopaglia Jan 20, 2025
c28ff00
Merge branch 'dev-giominimizer' of github.com:aclai-lab/SolePostHoc.j…
giopaglia Jan 20, 2025
1b2b258
forGio
Perro2110 Jan 20, 2025
960895b
Merge branch 'dev-giominimizer' of github.com:aclai-lab/SolePostHoc.j…
giopaglia Jan 20, 2025
97f2f98
Merge branch 'dev-giominimizer' into dev-gio
giopaglia Jan 21, 2025
318a315
Now it compiles
giopaglia Jan 21, 2025
5d34d30
Fixes. It compiles.
giopaglia Jan 21, 2025
435a1bd
Working on the convert
giopaglia Jan 21, 2025
8c6beab
Add Infiltrator for debugging
giopaglia Jan 21, 2025
19f1d52
Add encode_disjuncts call
giopaglia Jan 21, 2025
b830325
Add disjunct_to_combination! logic
giopaglia Jan 23, 2025
504907e
Minor
giopaglia Jan 29, 2025
7ed295e
Fix convert
giopaglia Jan 29, 2025
b05dc13
fix types.jl multiple dispatch
PasoStudio73 Jan 30, 2025
2c95123
fix minor
PasoStudio73 Jan 31, 2025
7510374
dirty test for Lumen with MITespresso in fast mode
Perro2110 Feb 1, 2025
229162e
first rework with trit-vector.jl
Perro2110 Feb 4, 2025
0bad2b1
fix spec error for my espresso
Perro2110 Feb 5, 2025
5f12692
fix sepc error for mit-espresso
Perro2110 Feb 5, 2025
582855f
add is less in trit-vector.jl
Perro2110 Feb 5, 2025
0aaeef5
small commit for README file
Perro2110 Feb 5, 2025
1184827
Merge branch 'lumen_dirtyTest' into dev-gio
giopaglia Feb 6, 2025
410da60
TwoLevel Convert -> constructor.
giopaglia Feb 6, 2025
e273365
removeduals
giopaglia Feb 6, 2025
95fd9cc
- ADD costructor
Perro2110 Feb 7, 2025
d5608dd
little docs
Perro2110 Feb 7, 2025
95b1e64
ADD setter-suit and visualize-suit
Perro2110 Feb 7, 2025
54eca93
onlyforfuninfreetime ADD man
Perro2110 Feb 7, 2025
0c1d488
elegant ?
Perro2110 Feb 7, 2025
27b4aac
Merge remote-tracking branch 'origin/lumen_dirtyTest' into dev-giomin…
giopaglia Feb 11, 2025
8d289e7
little fix Pre Remove BYPASS for alignment dirty_lumen
Perro2110 Feb 15, 2025
e420f60
Refactoring of BAtrees
Perro2110 Feb 15, 2025
056bf75
refactoring test --
Perro2110 Feb 15, 2025
8de9fff
little first fix, restruct batrees
Perro2110 Feb 15, 2025
e4a69b1
Revert "little first fix, restruct batrees"
Perro2110 Feb 15, 2025
f56d1b4
Revert "refactoring test --"
Perro2110 Feb 15, 2025
c427468
move complete refactoring dir about BATREES
Perro2110 Feb 16, 2025
ccdc228
add TODO
Perro2110 Feb 16, 2025
a11f21d
little fix
Perro2110 Feb 16, 2025
a41863f
confirm and correct readme
Perro2110 Feb 16, 2025
e65e8b2
Check if born_again_db exists and Check if bornAgain executable exists
Perro2110 Feb 16, 2025
969b963
Check if mode_obj is valid
Perro2110 Feb 16, 2025
c069bd2
little fix
Perro2110 Feb 18, 2025
fd73c5a
small FIX
Perro2110 Feb 19, 2025
d636e1a
Start work in intrees, notice bellatrex is not rule extraction
Perro2110 Feb 19, 2025
1035e2a
It... could... work! [Fix intrees]
Perro2110 Feb 19, 2025
8d10bf7
start api
Perro2110 Feb 19, 2025
376d0d0
refactoring name
Perro2110 Feb 19, 2025
73a6098
add api for intrees dl to ds
Perro2110 Feb 20, 2025
d8f95a0
fix
Perro2110 Feb 20, 2025
5816fdb
rn
Perro2110 Feb 20, 2025
790526e
start to add REFNEExtractorRule
Perro2110 Feb 20, 2025
142cf95
done refne
Perro2110 Feb 20, 2025
550a029
add README file for any algoritm
Perro2110 Feb 20, 2025
f37e236
reload readme
Perro2110 Feb 20, 2025
46834a9
TREPAN
Perro2110 Feb 20, 2025
eaca796
readme update/fix
Perro2110 Feb 20, 2025
2fe94ac
fix doc
Perro2110 Feb 21, 2025
8f553c8
fix image_family
Perro2110 Feb 21, 2025
489a2cb
Add RuleCosiPlus [have to test his RuleExtractor]
Perro2110 Feb 24, 2025
22e83df
up project.toml and change lenguage
Perro2110 Feb 24, 2025
a166221
Fix in future
Perro2110 Feb 24, 2025
68e5534
minor fix
Perro2110 Feb 25, 2025
c27ffe0
minor change
Perro2110 Feb 26, 2025
48bf69d
fix trepan
Perro2110 Feb 27, 2025
1161320
generalization for batrees
Perro2110 Mar 3, 2025
6c4e093
add max_rules in intrees
Perro2110 Mar 7, 2025
91287c1
minor feature, add vet importance
Perro2110 Mar 9, 2025
bc774be
Merge branch 'lumen_dirtyTest' into devPaso
PasoStudio73 Mar 10, 2025
8819028
updated deps
PasoStudio73 Mar 10, 2025
4f0d882
fix small things
PasoStudio73 Mar 11, 2025
a9e157e
no ref
Perro2110 Mar 11, 2025
dd6da31
Merge branch 'lumen_dirtyTest' into devPaso
PasoStudio73 Mar 12, 2025
be0f106
listrules wrap for SoleXplorer
PasoStudio73 Mar 15, 2025
5f340a4
hack for xgboost
PasoStudio73 Mar 16, 2025
6b9158b
minor fix for future test in apiAlgo
Perro2110 Mar 23, 2025
e560493
Merge branch 'lumen_dirtyTest' into devPaso
PasoStudio73 Mar 24, 2025
ee022d1
fix redefinition
PasoStudio73 Mar 24, 2025
a90503c
changed scalarlogiset feed
PasoStudio73 Mar 31, 2025
ff38051
translations parts from Italian to English. [minor fix- pre insertion…
Perro2110 Apr 1, 2025
eecc821
minor change in project toml
Perro2110 Apr 1, 2025
1f2d11c
test with .toml
Perro2110 Apr 1, 2025
c77d68f
Merge branch 'lumen_dirtyTest' into devPaso
PasoStudio73 Apr 16, 2025
8ec7b0f
rm __precompile__()
Perro2110 Apr 18, 2025
127aabb
rm TODO
Perro2110 Apr 18, 2025
bd9266f
add TODO.md in gitignor
Perro2110 Apr 18, 2025
41e3507
Merge branch 'lumen_dirtyTest' into devPaso
PasoStudio73 Apr 18, 2025
52d23f0
x Perry
PasoStudio73 Apr 23, 2025
2c95e2f
remove comment in api
Perro2110 Apr 24, 2025
a12a17c
removed precompile
PasoStudio73 Apr 24, 2025
37a1d75
Merge remote-tracking branch 'origin/lumen_dirtyTest' into devPaso
PasoStudio73 Apr 24, 2025
e013acf
Fix duplicated functions
PasoStudio73 Apr 24, 2025
559b821
Update gitignore
Perro2110 Apr 24, 2025
f3b8f7e
Update gitignore
Perro2110 Apr 24, 2025
9b8412d
minor update in test and todo
Perro2110 Apr 24, 2025
fc7c655
rulecosi fix
PasoStudio73 Apr 26, 2025
a4c9672
Merge branch 'devPaso' into lumen_dirtyTest
Perro2110 Apr 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .cirrus.yml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
freebsd_instance:
image_family: freebsd-14-1
image_family: freebsd-14-2
task:
name: FreeBSD
artifacts_cache:
Expand All @@ -17,4 +17,4 @@ task:
test_script:
- cirrusjl test
coverage_script:
- cirrusjl coverage codecov
- cirrusjl coverage codecov
Empty file modified .github/workflows/CompatHelper.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/Documentation.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/TagBot.yml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
36 changes: 32 additions & 4 deletions Project.toml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,21 +1,42 @@
name = "SolePostHoc"
uuid = "cf1aa0c3-12c9-4ebe-9bdc-bd6c2ca79b72"
authors = ["Michele Ghiotti", "Giovanni Pagliarini", "Eduard I. Stan"]
authors = ["Michele Ghiotti", "Giovanni Pagliarini", "Marco Perrotta", "Eduard I. Stan"]
version = "0.2.0"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
Clustering = "aaaa29a8-35af-508c-8bc3-b662a17a0fe5"
ComplexityMeasures = "ab4b797d-85ee-42ba-b621-05d793b346a2"
ConcurrentCollections = "5060bff5-0b44-40c5-b522-fcd3ca5cecdd"
Conda = "8f4d0f93-b110-5947-807f-2305c1781a2d"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
DecisionTree = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
Hyperopt = "93e5fe13-2215-51db-baaf-2e9a34fb2712"
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
MLJDecisionTreeInterface = "c6f25543-311c-4c74-83dc-3ea6d1015661"
ModalDecisionTrees = "e54bda2e-c571-11ec-9d64-0242ac120002"
MultivariateStats = "6f286f6a-111f-5878-ab1e-185364afe411"
NearestNeighbors = "b8a86587-4115-5ab1-83bc-aa920d37bbce"
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should clean all of these dependencies, we can't have this many. If needed, we should do package extensions e.g., for DecisionTree.jl

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes I have to put myself there! now start

ScikitLearn = "3646fa90-6ef7-5e7e-9f22-8aca16db6324"
SoleData = "123f1ae1-6307-4526-ab5b-aab3a92a2b8c"
SoleFeatures = "3ceb4e54-d968-4e97-8c18-2deeb0d429fb"
SoleLogics = "b002da8f-3cb3-4d91-bbe3-2953433912b5"
SoleModels = "4249d9c7-3290-4ddd-961c-e1d3ec2467f8"
StatProfilerHTML = "a8a75453-ed82-57c9-9e16-4cd1196ecbf5"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
Expand All @@ -25,12 +46,19 @@ ThreadsX = "ac1d9e8a-700a-412c-b207-f0111f4b6c0d"
ModalDecisionTrees = "0.5 - 0.6"
Random = "1"
SoleData = "0.16"
SoleLogics = "0.11"
SoleLogics = "0.11 - 0.12"
SoleModels = "0.10"
julia = "1"

[extras]
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DecisionTree = "7806a523-6efd-50cb-b5f6-3fa6f1930dbb"
Infiltrator = "5903a43b-9cc3-4c30-8d17-598619ec4e9b"
MLJ = "add582a8-e3ab-11e8-2d5e-e98b27df1bc7"
MLJBase = "a7f614a8-145f-11e9-1d2a-a57a1082229d"
MLJDecisionTreeInterface = "c6f25543-311c-4c74-83dc-3ea6d1015661"
RDatasets = "ce6b1742-4840-55fa-b093-852dadbb1d8b"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test", "MLJ", "MLJBase", "MLJDecisionTreeInterface", "DataFrames", "DecisionTree"]
75 changes: 69 additions & 6 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,76 @@
<div align="center"><a href="https://github.com/aclai-lab/Sole.jl"><img src="logo.png" alt="" title="This package is part of Sole.jl" width="200"></a></div>

# SolePostHoc.jl
# SolePostHoc.jl – Post-Hoc Analysis for Symbolic Learning
🚧 This package is under construction. 🚧


<!--
[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://aclai-lab.github.io/SolePostHoc.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://aclai-lab.github.io/SolePostHoc.jl/dev)
[![Build Status](https://api.cirrus-ci.com/github/aclai-lab/SolePostHoc.jl.svg?branch=main)](https://cirrus-ci.com/github/aclai-lab/SolePostHoc.jl)
[![Coverage](https://codecov.io/gh/aclai-lab/SolePostHoc.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/aclai-lab/SolePostHoc.jl)
[![Coverage](https://coveralls.io/repos/github/aclai-lab/SolePostHoc.jl/badge.svg?branch=main)](https://coveralls.io/github/aclai-lab/SolePostHoc.jl?branch=main)
-->

🚧 This package is under construction. 🚧
## In a nutshell

*SolePostHoc.jl* is dedicated to post-hoc analysis and optimization of symbolic learning models. It provides a comprehensive suite of algorithms for:
- Rule extraction from both symbolic and non-symbolic models
- Rule minimization and optimization
- Model transformation and enhancement
- Interpretability analysis

## Key Features

### Rule Extraction and Model Optimization
- Extraction of comprehensible rules from complex models
- Support for various source models:
- Decision trees and random forests
- Black-box models
- A clean Rule extraction interface (`SolePostHoc.modalextractrules`)
- Implementation of state-of-the-art algorithms:
- LUMEN (L: Logic-driven U: Unified M: Minimal E: Extractor of N: Notions)
- InTrees (Interpret Tree Ensembles)
- TREPAN
- REFNE
- have binding with other state-of-the-art algorithms
- binding to RuleCOSI(+)
- BATrees (Born Again Trees)
### Through these we guarantee
- Rule minimization techniques
- Model simplification while preserving accuracy
- Performance enhancement through post-processing

### Integration
- Seamless integration with other Sole.jl packages


## Usage Example

```julia
# Load packages
using SolePostHoc
using SoleModels
using MLJ

# Load and prepare a model (e.g., a random forest)
🌳 = load_model("your_model.jl")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But how about instead of load_model we build a decision tree manually, by parsing, or automatically from a dataset? If we want to keep this example short, then let's do it either manually

🌳 = Branch(@scalarformula(sepal_length > 10 \wedge sepal_width < 20), Leaf("virginica"), Leaf("setosa"))

or by means of parsing:

🌳 = "
[49, 0, 0] IF petal length<=3.0 AND sepal width>=2.9 THEN iris=Iris-setosa  -0.0
[0, 0, 39] IF petal width>=1.8 AND sepal length>=6.0 THEN iris=Iris-virginica  -0.0
[0, 8, 0] IF sepal length>=4.9 AND sepal width>=3.1 THEN iris=Iris-versicolor  -0.0
[0, 0, 2] IF petal length<=4.9 AND petal width>=1.7 THEN iris=Iris-virginica  -0.0
[0, 0, 5] IF petal width>=1.8 THEN iris=Iris-virginica  -0.0
[0, 35, 0] IF petal length<=5.0 AND sepal width>=2.4 THEN iris=Iris-versicolor  -0.0
[0, 0, 2] IF sepal width>=2.8 THEN iris=Iris-virginica  -0.0
[0, 3, 0] IF petal width<=1.0 AND sepal length>=5.0 THEN iris=Iris-versicolor  -0.0
[0, 1, 0] IF sepal width>=2.7 THEN iris=Iris-versicolor  -0.0
[0, 0, 1] IF sepal width>=2.6 THEN iris=Iris-virginica  -0.0
[0, 2, 0] IF sepal length>=5.5 AND sepal length>=6.2 THEN iris=Iris-versicolor  -0.0
[0, 1, 0] IF sepal length<=5.5 AND petal length>=4.0 THEN iris=Iris-versicolor  -0.0
[0, 0, 1] IF sepal length>=6.0 THEN iris=Iris-virginica  -0.0
[1, 0, 0] IF sepal length<=4.5 THEN iris=Iris-setosa  -0.0
[50, 50, 50] IF TRUE THEN iris=Iris-setosa  -1.584962500721156
" |> SoleModels.parse_orange_decision_list

Btw I like Leaf instead of LeafModel: should we adopt it in SoleModels? Look how well it reads above, with the name symmetry with Branch.

Ps Nice iconography with the emojis!


# Extract rules
🍃 = modalextractrules(RuleExtractor = LumenRuleExtractor,🌳)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modalextractrules -> extractrules since if we tend to regrad rule extraction as a logic-agnostic process.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a space missing before 🌳

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"modalextractrules -> extractrules" it's a request from the professor... he preferred this one...

"There's a space missing before 🌳" wow I hadn't noticed that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not a single modality anywhere in this package. But if we really can't resist throwing a modal in here, let's at least introduce it as an alias modalextractrules = extractrules.


# View metrics
printmetrics(🍃)
```


## Want to know more?
For the theoretical foundations of Sole framework, refer to:
[*Modal Symbolic Learning: from theory to practice*, G. Pagliarini (2024)](https://scholar.google.com/citations?view_op=view_citation&hl=en&user=FRo4yrcAAAAJ&citation_for_view=FRo4yrcAAAAJ:LkGwnXOMwfcC)

Comment on lines +63 to +66
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here it's better if we refer to the Sole.jl github, so that mantaining references is less of a burden? Similar to https://github.com/aclai-lab/SoleLogics.jl?tab=readme-ov-file#about

But I see that SoleModels also has this same footer https://github.com/aclai-lab/SoleModels.jl?tab=readme-ov-file#want-to-know-more

SoleData is even more different... https://github.com/aclai-lab/SoleData.jl

We probably should choose one style of referencing to Sole and its background, and stick with it across all packages like SoleLogics and SoleData. I don't know which style is the correct one. Thoughts? @ferdiu @alberto-paparella @mauro-milella ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a great talking point for a Sole Reunion

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the more maintainable between all of them is the one present in SoleModels you linked. I also liked the idea of the Similar Julia Packages from SoleLogics but it is going to be hard to keep it up-to-date so I would not go down that path for all packages.

I would go with SoleModels model 😝 for the footer of the READMEs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @ferdiu, I also prefer the one from SoleModels.jl. I also like the Similar Julia Packages paragraph in SoleLogics.jl and I would keep it there, but I don't think we need it in all packages.

## About

The package is developed by the [ACLAI Lab](https://aclai.unife.it/en/) @ University of Ferrara.

## More on Sole
*SolePostHoc.jl* is part of the [*Sole.jl*](https://github.com/aclai-lab/Sole.jl) ecosystem, working alongside:
- [SoleLogics.jl](https://github.com/aclai-lab/SoleLogics.jl): Logical foundations
- [SoleData.jl](https://github.com/aclai-lab/SoleData.jl): Data handling
- [SoleModels.jl](https://github.com/aclai-lab/SoleModels.jl): Model definitions
- [SoleFeatures.jl](https://github.com/aclai-lab/SoleFeatures.jl): Feature engineering
14 changes: 14 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# TODO


## LUMEN
- Remove Italian sentences
-

## BA-Trees
BA-Trees must be integrated well as a `RuleExtraction` object. Some first steps:
- Separate forest learning, forest simplification, and algorithm testing logics.
- Write a function that translates decision forests to BA-tree txt format.
- Write a function that translates ANY (non-bag) symbolic model to BA-tree txt format. Remember that any non-bag model can be seen as a particular case of a forest (ensemble of trees), via a polynomial reduction
- Build object `BATreesRuleExtraction`, which outputs a SoleModel.DecisionTree. Be careful: clarify the assumpions on the symbolic model type, or the underlying logical language
- Can we extend it to the modal level?
Empty file modified docs/Manifest.toml
100644 → 100755
Empty file.
Empty file modified docs/Project.toml
100644 → 100755
Empty file.
Empty file modified docs/make.jl
100644 → 100755
Empty file.
Empty file modified docs/src/index.md
100644 → 100755
Empty file.
Empty file modified logo.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
151 changes: 151 additions & 0 deletions src/BA-Trees/Breast-Cancer-Wisconsin.RF1.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
4 150 4
5.1 3.5 1.4 0.2
4.9 3.0 1.4 0.2
4.7 3.2 1.3 0.2
4.6 3.1 1.5 0.2
5.0 3.6 1.4 0.2
5.4 3.9 1.7 0.4
4.6 3.4 1.4 0.3
5.0 3.4 1.5 0.2
4.4 2.9 1.4 0.2
4.9 3.1 1.5 0.1
5.4 3.7 1.5 0.2
4.8 3.4 1.6 0.2
4.8 3.0 1.4 0.1
4.3 3.0 1.1 0.1
5.8 4.0 1.2 0.2
5.7 4.4 1.5 0.4
5.4 3.9 1.3 0.4
5.1 3.5 1.4 0.3
5.7 3.8 1.7 0.3
5.1 3.8 1.5 0.3
5.4 3.4 1.7 0.2
5.1 3.7 1.5 0.4
4.6 3.6 1.0 0.2
5.1 3.3 1.7 0.5
4.8 3.4 1.9 0.2
5.0 3.0 1.6 0.2
5.0 3.4 1.6 0.4
5.2 3.5 1.5 0.2
5.2 3.4 1.4 0.2
4.7 3.2 1.6 0.2
4.8 3.1 1.6 0.2
5.4 3.4 1.5 0.4
5.2 4.1 1.5 0.1
5.5 4.2 1.4 0.2
4.9 3.1 1.5 0.2
5.0 3.2 1.2 0.2
5.5 3.5 1.3 0.2
4.9 3.6 1.4 0.1
4.4 3.0 1.3 0.2
5.1 3.4 1.5 0.2
5.0 3.5 1.3 0.3
4.5 2.3 1.3 0.3
4.4 3.2 1.3 0.2
5.0 3.5 1.6 0.6
5.1 3.8 1.9 0.4
4.8 3.0 1.4 0.3
5.1 3.8 1.6 0.2
4.6 3.2 1.4 0.2
5.3 3.7 1.5 0.2
5.0 3.3 1.4 0.2
7.0 3.2 4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