<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>Workshop on Artificial Intelligence and Formal Verification, Logics, Automata and Synthesis (OVERLAY),
September</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>Symbolic Learning with Interval Temporal Logic: the Case of Regression ∗</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Estrella Lucena-Sanchez</string-name>
          <email>1estrella.lucenasanchez@unife.it</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Guido Sciavicco</string-name>
          <email>2guido.sciavicco@unife.it</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Ionel Eduard Stan</string-name>
          <email>3ioneleduard.stan@unife.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Ferrara and University of Parma</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of Ferrara and Unversity of Modena and Reggio Emilia</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>University of Ferrara</institution>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2020</year>
      </pub-date>
      <volume>25</volume>
      <issue>2020</issue>
      <fpage>5</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>Regression analysis is the statistical process used to estimate the relationship between a dependent variable and one or more independent variables. In machine learning, typical statistical approaches to regression such as linear regression are often replaced with symbolic learning, such as decision tree regression, to capture non-linear behaviour while keeping the interpretability of the results. For temporal series, regression is sometimes enhanced by using historical values of the independent variables. In this paper, we show how temporal regression can be handled by a symbolic learner based on interval temporal logic decision trees.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        A multivariate time series [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is a set of variables that change over time. Each variable of a multivariate
time series is an ordered collection of N real values, and, usually, in a multivariate time series one identifies
one dependent variable B, whose values we are interested to predict, and the independent variables
A1, . . . , An, whose values are used for the prediction. Multivariate time series emerge in many application
contexts. The temporal history of some hospitalized patient can be described by the time series of the
values of his/her temperature, blood pressure, and oxygenation; the pronunciation of a word in sign
language can be described by the time series of the relative and absolute positions of the ten fingers w.r.t.
some reference point; different sport activities can be distinguished by the time series of some relevant
physical quantities. Having identified the dependent variable, the most relevant and interesting problem
defined on a time series is forecasting, that is, the problem of predicting its future values, and it is typically
solved by regression.
      </p>
      <p>Regression is the statistical process used to capture the parameters that influence the relationship
between independent and dependent variables. In the context of temporal regression with machine learning,
temporal regression
autoregression
ex.: Arima
functional regr. symbolic regr.
exa.a:aaaaaaaaaaaaaaaaaaaaaaaaaaaaRaaeagaraaeasasaiaoaanaatrees</p>
      <p>Linear regr ex.:
| via lagged tr{aznsformation }
there are three main categories of approach. Autoregression is a set of statistical techniques developed
mainly to model the idea that past values of the independent variable may influence, in several different
ways, future values. These are techniques originally developed for univariate series, and later extended to
the multivariate case. Lagged variables is the machine learning generalization to the latter idea, so to
say, and it consists of transforming the original data set by adding virtual variables that represent the
past values. For example, for a independent variable Ai(t) (in which we make it explicit the temporal
parameter), one adds the lagged variable Ai(t − 1) and Ai(t − 2), . . ., that correspond, respectively, to
the value of Ai one, two, . . . , units of time before. In this way, a static learner (where each instance
of the data set is independent from any other) can be used on the transformed data set, giving rise to
the possibility of using functional regression algorithms, such as linear regression and neural networks,
among others, and symbolic regression algorithms, such as regression tree learning algorithms. While
certain classical regression algorithms, such as linear regression or decision trees are interpretable by
nature (that is, they return an explicit model), the possibility of understanding the underlying process
may be hampered by the presence of lagged variables.</p>
      <p>
        Regression trees were introduced in the CART (classification and regression trees) system in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], but
their practical introduction can be dated back to [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. The problem of extracting the optimal decision tree
from a data set is NP-hard [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], which justifies the use of sub-optimal approaches. The ID3 algorithm [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] is
a greedy approach to the extraction of a decision tree, later extended and generalized in the algorithm
C4.5 [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. In this paper we sketch the theoretical basis of temporal regression tree learning, taking inspiration
from [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], in which the idea of temporal decision tree learning was first introduced. The underlying idea is
to generalize the concept of lagged data. Instead of transforming the original time series into a static data
set by simply flattening the past values of the independent variables into atemporal instances, we produce
an intermediate data set in which each instance is, itself, a multivariate time series of a fixed length l
(which is the amount of the lag). In this way, to predict a certain value B(t), we use the multivariate time
series given by the values of the variables A1, . . . , An at the times t − l, t − (l − 1), . . . , t − 1, t, and we
label it with the value B(t), mimicking, in a way, a moving window approach. From [
        <xref ref-type="bibr" rid="ref10 ref4">10, 4</xref>
        ], we know that
an interval temporal logic such as HS [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is a very convenient language to describe time series. So, we use
a greedy approach such as the one presented in [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], suitably adapted to the regression case, to learn a
locally optimal regression tree.
2
      </p>
      <p>
        Time Series and Interval Temporal Logic
Let [N ] an initial subset of N of length N . An interval over [N ] is an ordered pair [x, y], where x, y ∈ [N ]
and x &lt; y, and we denote by I([N ]) the set of all intervals over [N ]. If we exclude the identity relation,
there are 12 different Allen’s relations between two intervals in a linear order [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]: the six relations RA
(adjacent to), RL (later than), RB (begins), RE (ends), RD (during), and RO (overlaps), depicted in
Fig. 2, and their inverses, that is, RX¯ = (RX )−1, for each X ∈ X , where X = {A, L, B, E, D, O}. Halpern
and Shoham’s modal logic of temporal intervals (HS) is defined from a set of propositional letters AP, and
by associating a universal modality [X] and an existential one hXi to each Allen’s relation RX . Formulas
of HS are obtained by:
      </p>
      <p>HS
hAi
hLi
hBi
hEi
hDi
hOi</p>
      <p>Allen’s relations
[x, y]RA[x0, y0] ⇔ y = x0
[x, y]RL[x0, y0] ⇔ y &lt; x0
[x, y]RB[x0, y0] ⇔ x = x0, y0 &lt; y
[x, y]RE[x0, y0] ⇔ y = y0, x &lt; x0
[x, y]RD[x0, y0] ⇔ x &lt; x0, y0 &lt; y
[x, y]RO[x0, y0] ⇔ x &lt; x0 &lt; y &lt; y0</p>
      <p>Graphical representation
x y</p>
      <p>ϕ ::= p | ¬ϕ | ϕ ∨ ϕ | hXiϕ | hX¯ iϕ,
where p ∈ AP and X ∈ X . The other Boolean connectives and the logical constants, e.g., → and &gt;, as
well as the universal modalities [X], can be defined in the standard way, i.e., [X]p ≡ ¬hXi¬p. For each
¯
X ∈ X , the modality hXi (corresponding to the inverse relation RX¯ of RX ) is said to be the transpose
of the modalities hXi, and vice versa. The semantics of HS formulas is given in terms of timelines
T = hI([N ]), V i, where V : AP → 2I([N]) is a valuation function which assigns to each atomic proposition
p ∈ AP the set of intervals V (p) on which p holds. The truth of a formula ϕ on a given interval [x, y] in
an interval model T is defined by structural induction on formulas as follows:</p>
      <p>T, [x, y]
T, [x, y]
T, [x, y]
T, [x, y]
T, [x, y]
p
¬ψ
ψ ∨ ξ
hXiψ
hX¯ iψ
if [x, y] ∈ V (p), for p ∈ AP;
if T, [x, y] 6 ψ;
if T, [x, y] ψ or T, [x, y] ξ;
if there is [w, z] s.t [x, y]RX [w, z] and T, [w, z]
if there is [w, z] s.t [x, y]RX¯ [w, z] and T, [w, z]
ψ;
ψ.</p>
      <p>
        A time series can be described by formulas of HS, in which propositional letters represent decisions of
the type Ai ./ k (./ ∈ {≤, =, &gt;}) for some value k. We can arbitrarily impose that a decision Ai ./ k is
true on an interval [x, y] if and only if the ratio between number of time points between x and y having a
value that satisfies ./ k and the quantity y − x is at least α, for a fixed α. From there, we can lift the
evaluation to a formula. For example, in Fig. 3, the series T is such that T, [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ] [A](A1 &gt; 10), with
α = 1.
3
      </p>
      <p>
        Interval Temporal Logic Regression Trees
Static regression learning is exemplified in Fig. 3, middle, left. If we want to construct a static regression
model for the values of B, say, from the time point 3 to the time point 8, we build a data set with
the values of A1, A2 at each of such points associated with the corresponding value of B. Static lagged
regression improves upon static learning by associating also the values of A1 and A2 at t − 3, t − 2, and
so on; a multivariate linear regression algorithm, or a regression tree, may benefit from this historical
information to build a model for B. Since a static regression tree is an NP-hard problem, the most popular
solution is to use a sub-optimal greedy strategy based on the following principles [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]: given a data set
D = {I1, . . . , Im}, it is defined the notion of split, by means of which D is partitioned into two sets D1, D2
on the basis of a decision (propositional formula) of the type Ai ./ k , for some attribute Ai and value k;
in other words, for each instance Ij we check:
      </p>
      <p>Ij</p>
      <p>Ai ./ k
to decide if Ij belongs to D1 or D2. Then, D, D1, and D2 are compared against each other establish the
amount of information conveyed by that split; in regression problems, the information can simply be the
(1)
(2)
35 120 42
30 115 41
25 110 40 A2 •
20 105 39
15 100 38 B •
10 95 37
5 90 36 A1 •
A1 A2 B
variance of the predicted attribute in each data set. So, a simple greedy strategy can be devised: (i) at
each step, if the stopping condition is not reached, find the attribute Ai and the value k that maximize
the information conveyed by a split on that decision; (ii) split the current data set on the basis of the
decision taken at the previous step; (iii) perform two recursive calls on the obtained data sets. At the end
of this process, the entire model is described by a tree whose edges are labeled by decisions, and each
branch can be seen as a propositional formula.</p>
      <p>
        Here, we propose to design an algorithm capable to extract a regression tree after a transformation as
in Fig. 3, bottom. For a fixed lag l, to each value B(t), we associate the finite time series described by
Ai(t − l), Ai(t − l + 1), . . . for each i, and each represented by a string. We define a split based on a HS
formula of the type hXi(Ai ./ k ), which we call atomic HS formulas, where decisions have taken the place
of propositional letters. Thus, fixed a lag l, at the beginning, the time series T with N points is replaced
by a data set T = {T1, . . . , TN−l+1} in which each instance is, itself, a multivariate time series labelled by
a value of B and encompassing l points. Each of such series is initially associated to a reference interval
generically denoted [
        <xref ref-type="bibr" rid="ref1">0, 1</xref>
        ], and the main split operation now consists of checking:
      </p>
      <p>Tj , [x, y]</p>
      <p>hXi(Ai ./ k ).</p>
      <p>By applying the same learning algorithm, then, one obtains a tree whose edges are labeled with atomic
HS formulas instead of propositional formulas, and whose branches, then, can be read as formulas of HS.
In this way, the obtained regression tree keeps the original non-linear (step-type) behaviour, but takes into
account the recent history of a value to perform the prediction, and it does so natively. Initial experiments
on real data sets seem to offer encouraging results.
4</p>
    </sec>
    <sec id="sec-2">
      <title>Conclusions</title>
      <p>We have sketched the theoretical bases for a temporal regression tree learning algorithm, based on the
interval temporal logic HS, which allows us to natively take into account the past values of the independent
variables and their mutual relationships.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Allen</surname>
          </string-name>
          .
          <article-title>Maintaining knowledge about temporal intervals</article-title>
          .
          <source>Communications of the ACM</source>
          ,
          <volume>26</volume>
          (
          <issue>11</issue>
          ):
          <fpage>832</fpage>
          -
          <lpage>843</lpage>
          ,
          <year>1983</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>G.</given-names>
            <surname>Box</surname>
          </string-name>
          , G. Jenkins, and
          <string-name>
            <given-names>G.</given-names>
            <surname>Reinsel</surname>
          </string-name>
          . Time Series Analysis. Wiley,
          <year>1970</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>L.</given-names>
            <surname>Breiman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Friedman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C. J.</given-names>
            <surname>Stone</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R. A.</given-names>
            <surname>Olshen</surname>
          </string-name>
          .
          <article-title>Classification and Regression Trees</article-title>
          .
          <source>Taylor&amp;Francis</source>
          ,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>A.</given-names>
            <surname>Brunello</surname>
          </string-name>
          , G. Sciavicco,
          <string-name>
            <given-names>and I. E.</given-names>
            <surname>Stan</surname>
          </string-name>
          .
          <article-title>Interval temporal logic decision tree learning</article-title>
          .
          <source>In Proc. of the 16th European Conference on Logics in Artificial Intelligence (JELIA)</source>
          , volume
          <volume>11468</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>778</fpage>
          -
          <lpage>793</lpage>
          . Springer,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>J. Y.</given-names>
            <surname>Halpern</surname>
          </string-name>
          and
          <string-name>
            <given-names>Y.</given-names>
            <surname>Shoham</surname>
          </string-name>
          .
          <article-title>A propositional modal logic of time intervals</article-title>
          .
          <source>Journal of the ACM</source>
          ,
          <volume>38</volume>
          (
          <issue>4</issue>
          ):
          <fpage>935</fpage>
          -
          <lpage>962</lpage>
          ,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>L.</given-names>
            <surname>Hyafil</surname>
          </string-name>
          and
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Rivest</surname>
          </string-name>
          .
          <article-title>Constructing optimal binary decision trees is NP-complete</article-title>
          .
          <source>Information Processing Letters</source>
          ,
          <volume>5</volume>
          (
          <issue>1</issue>
          ):
          <fpage>15</fpage>
          -
          <lpage>17</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          .
          <article-title>Induction of decision trees</article-title>
          .
          <source>Machine Learning</source>
          ,
          <volume>1</volume>
          :
          <fpage>81</fpage>
          -
          <lpage>106</lpage>
          ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          .
          <source>C4</source>
          .
          <article-title>5: Programs for Machine Learning</article-title>
          . Morgan Kaufmann,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>J. R.</given-names>
            <surname>Quinlan</surname>
          </string-name>
          .
          <article-title>Simplifying decision trees</article-title>
          .
          <source>International Journal of Human-Computer Studies</source>
          ,
          <volume>51</volume>
          (
          <issue>2</issue>
          ):
          <fpage>497</fpage>
          -
          <lpage>510</lpage>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>G.</given-names>
            <surname>Sciavicco</surname>
          </string-name>
          ,
          <string-name>
            <given-names>I. E.</given-names>
            <surname>Stan</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Vaccari</surname>
          </string-name>
          .
          <article-title>Towards a general method for logical rule extraction from time series</article-title>
          .
          <source>In Proc. of the 8th International Work-Conference on the Interplay Between Natural and Artificial Computation (IWINAC)</source>
          , volume
          <volume>11487</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>3</fpage>
          -
          <lpage>12</lpage>
          . Springer,
          <year>2019</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>