Skip to content

Commit 0e997cf

Browse files
committed
improve english
1 parent ae9933c commit 0e997cf

File tree

1 file changed

+30
-3
lines changed

1 file changed

+30
-3
lines changed

docs/src/modal-generalization.md

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,41 @@ In the context of this package, modal logic helps us highlight complex relations
88

99
The idea is to discretize complex data into relational objects called *Kripke models*, each of which consists of many propositional models called *worlds*, and expliciting the relations between worlds. In this way, it is possible to mine complex [`Itemset`](@ref), including a certain subset of [`Item`](@ref) that are true on a target world, but also *modally enhanced* items that are true on related worlds.
1010

11-
A picture is worth a thousand words. Here you are a slightly more complex example, with respect to the one at the top of [`Getting started`](@ref getting-started) section.
11+
A picture is worth a thousand words. Here you are a slightly more complex example, with respect to the one at the top of [`Getting started`](@ref getting-started) section. We consider this monovariate time series:
1212

13+
![Monovariate time series.](assets/figures/natops-signals/logiset/original-ts.png)
1314

15+
We want to encode a graph-like structure from the data above. We could think of various strategies, one of which is to consider every contiguous subsequence in the time series and model it as a set of intervals.
1416

17+
![Monovariate time series sliced into intervals.](assets/figures/natops-signals/logiset/logiset-signals.png)
1518

16-
# [Association rule mining with modal logic](@id man-modal-generalization)
19+
At this point, we can see every resulting blue signal as a propositional model, on which items may be evaluated as true or false. In the modal logic jargon, this is exactly a Kripke model.
20+
21+
![Kripke model resulting from the image above.](assets/figures/natops-signals/logiset/logiset-worlds.png)
22+
23+
After fixing a set of suitable relations, we express them with arcs in the structure. Without defining them, we graphically present some possible relations between intervals. The one below is the *begins* relation.
24+
25+
![Begins relation.](assets/figures/natops-signals/logiset/begins.png)
26+
27+
Conversely, this one is the *ends* relation.
28+
29+
![Ends relation.](assets/figures/natops-signals/logiset/ends.png)
30+
31+
When an interval is completely included in another one, then we say that it happens *during* the other one.
1732

18-
## New building blocks
33+
![During relation.](assets/figures/natops-signals/logiset/during.png)
34+
35+
Finally, we say that an interval comes just *after* another one if its end coincides with the beginning of the other one.
36+
37+
![After relation.](assets/figures/natops-signals/logiset/after.png)
38+
39+
Every relation $R$ can be declined in an *existential* or a *universal* way. In the former (latter) case, given an item $p$, we say that $<R>p$ is true on $w$ if at least one world (all worlds) $w'$ is such that $wRw'$ and $p$ is true on $w'$. Such relations can be encoded thanks to SoleLogics.jl; in particular, we use `diamond(relation_name)` to indicate an *existential modality* while `box(relation_name)` to indicate universal ones:
40+
41+
```julia
42+
myitem = ScalarCondition(VariableDistance(1, [1,2,3]), <=, 1.0) |> diamond(IA_L)
43+
```
44+
45+
# [Association rule mining with modal logic](@id man-modal-generalization)
1946

2047
```@docs
2148
WorldMask

0 commit comments

Comments
 (0)