Skip to content

Commit 1769a5a

Browse files
committed
big enhancement
1 parent 1eec4ab commit 1769a5a

File tree

1 file changed

+40
-17
lines changed

1 file changed

+40
-17
lines changed

docs/src/modal-generalization.md

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
CurrentModule = ModalAssociationRules
33
```
44

5+
# [Association rule mining with modal logic](@id man-modal-generalization)
6+
57
Symbolic modal learning is a branch of machine learning which deals with training classical symbolic machine learning models (e.g., list and set of rules, decision trees, random forests, association rules, etc.) but substituting propositional logic with a more expressive logical formalism (yet, computationally more affordable than first order logic), that is, a specific kind of modal logic.
68

79
In the context of this package, modal logic helps us highlight complex relations hidden in data, especially in *unstructured data*, consisting of graph-like relational data, time series, spatial databases, text, etc. For more information about the modal symbolic learning, we suggest reading the main page of [`Sole.jl` framework](https://github.com/aclai-lab/Sole.jl) and [`SoleLogics.jl`](https://github.com/aclai-lab/SoleLogics.jl).
@@ -42,36 +44,57 @@ Every relation $R$ can be declined in an *existential* or a *universal* way. In
4244
myitem = ScalarCondition(VariableDistance(1, [1,2,3]), <=, 1.0) |> diamond(IA_L)
4345
```
4446

45-
# [Association rule mining with modal logic](@id man-modal-generalization)
47+
## Meaningfulness measures
48+
49+
We already introduced [`lsupport`](@ref), [`gsupport`](@ref), [`lconfidence`](@ref) and [`gconfidence`](@ref) in the [`Getting started`](#man-core) section. Other measures that are already built into the package, are the following; note how they are always organized in both *local* and *global* versions.
50+
51+
Local means that a measure is designed to be applied within a modal instance (a Kripke model), while global keywords denotes the fact that the computation is performed across instances.
4652

4753
```@docs
48-
WorldMask
49-
EnhancedItemset
50-
ConditionalPatternBase
54+
llift
55+
glift
56+
lconviction
57+
gconviction
58+
lleverage
59+
gleverage
5160
```
5261

53-
## Modal logic in action
62+
In general, we can define new meaningfulness measures by leveraging the following macros, ensuring to avoid solving repeated subproblems when computing the measure.
63+
5464
```@docs
55-
initminingstate(::typeof(fpgrowth), ::MineableData)
65+
@localmeasure
66+
@globalmeasure
5667
```
5768

58-
## Meaningfulness measures
69+
You can identify which is the local (global) counterpart of a global (local) meaningfulness measure with the following utility dispatches.
5970

60-
In general, we can define new meaningfulness measures by leveraging the following macros.
71+
```@docs
72+
islocalof(::Function, ::Function)
73+
localof(::Function)
74+
75+
isglobalof(::Function, ::Function)
76+
globalof(::Function)
77+
```
78+
79+
Of course, you can even link your custom measures.
6180

6281
```@docs
63-
@localmeasure
64-
@globalmeasure
6582
@linkmeas
6683
```
6784

68-
We already introduced [`lsupport`](@ref), [`gsupport`](@ref), [`lconfidence`](@ref) and [`gconfidence`](@ref) in the [`Getting started`](#man-core) section. Other measures that are already built into the package, are the following; note how they are always organized in both local and global versions.
85+
## Other utilities
86+
87+
Every algorithm implemented in this package is designed for the modal symbolic learning context.
88+
The are three common types appearing in such algorithms.
6989

7090
```@docs
71-
llift
72-
glift
73-
lconviction
74-
gconviction
75-
lleverage
76-
gleverage
91+
WorldMask
92+
EnhancedItemset
93+
ConditionalPatternBase
94+
```
95+
96+
We can enrich the [`MiningState`](@ref) of an [`AbstractMiner`](@ref) by using the following trait, depending on the specific algorithm and the kind of data we want to handle.
97+
98+
```@docs
99+
initminingstate(::typeof(fpgrowth), ::MineableData)
77100
```

0 commit comments

Comments
 (0)