<!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 />
    <article-meta>
      <title-group>
        <article-title>Computing Similarity Dependencies with Pattern Structures</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Jaume Baixeries</string-name>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mehdi Kaytoue</string-name>
          <email>mehdi.kaytoue@insa-lyon.fr</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Amedeo Napoli</string-name>
          <email>amedeo.napoli@loria.fr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LORIA (CNRS - Inria Nancy Grand Est - Universit ́e de Lorraine)</institution>
          ,
          <addr-line>B.P. 239, F-54506, Vandoeuvre-l`es-Nancy</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Universit ́e de Lyon. CNRS</institution>
          ,
          <addr-line>INSA-Lyon, LIRIS. UMR5205, F-69621</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Universitat Polit`ecnica de Catalunya.</institution>
          <addr-line>08032, Barcelona. Catalonia</addr-line>
        </aff>
      </contrib-group>
      <fpage>33</fpage>
      <lpage>44</lpage>
      <abstract>
        <p>Functional dependencies provide valuable knowledge on the relations between the attributes of a data table. To extend their use, generalizations have been proposed, among which purity and approximate dependencies. After discussing those generalizations, we provide an alternative definition, the similarity dependencies, to handle a similarity relation between data-values, hence un-crisping the basic definition of functional dependencies. This work is rooted in formal concept analysis, and we show that similarity dependencies can be easily characterized and computed with pattern structures.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In the relational database model, functional dependencies (FDs) are among the
most popular types of dependencies [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] since they indicate a functional relation
between sets of attributes: the values of a set of attributes are determined by the
values of another set of attributes. To handle errors and uncertainty in real-world
data, alternatives exist. Approximate Dependencies [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] are FDs that hold in a
part –which is user defined– of the database. Purity Dependencies [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] express
the relationship on the relative impurity induced by two partitions of the table
(generated by two sets of attributes). If the impurity is zero, we have a FD.
      </p>
      <p>
        These generalizations do not necessarily capture the semantics of some
patterns that may hold in a dataset. This motivates the definition of “Similarity
Dependencies”, which can be seen as a generalization of Functional
Dependencies, but un-crispring the basic definition of FDs: similar values of an attribute
determine similar values of another attribute. Similarity has been considered
for FDs under several terms, e.g. fuzzy FDs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], matching dependencies [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ],
constraint generating dependencies [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. Moreover, it is still an active topic of
research in the database community [
        <xref ref-type="bibr" rid="ref16 ref17 ref4 ref8">4,8,16,17</xref>
        ].
      </p>
      <p>
        The main objective of the present article is to give a characterization of
similarity dependencies within FCA [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], thanks to the formalism of pattern
structures [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. Indeed, characterizing and computing FDs is strongly related to
lattice theory and FCA. For example, the lattice characterization of a set of
FDs is studied in [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5,6,7</xref>
        ], while a characterization within a formal context in
c paper author(s), 2013. Published in Manuel Ojeda-Aciego, Jan Outrata (Eds.): CLA
2013, pp. 33{44, ISBN 978{2{7466{6566{8, Laboratory L3i, University of La
Rochelle, 2013. Copying permitted only for private and academic purposes.
FCA is proposed in [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. The latter is based on a binarization, which is the
transformation of the original set of data into a binary context. To overcome
the burden usually induced by such a transformation, pattern structures [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]
have emerged as a valuable alternative to avoid arbitrary transformations and
complexity problems [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ].
      </p>
      <p>
        Accordingly, our purpose here is threefold. Firstly, we propose a definition of
Similarity Dependencies, and secondly a formalization based on pattern
structures in FCA, avoiding a transformation of data into a binary table. It follows
that classical algorithms of FCA can be –almost directly– applied to compute
similarity dependencies. This work is based on [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] where FDs are characterized
thanks to pattern structures, and on [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] where similarity is introduced in
pattern structures as a tolerance relation (reflexive, symmetric, but not transitive).
Finally, we also report preliminary experiments showing the capabilities of the
approach.
      </p>
      <p>The paper is organized as follows. In Section 2 we introduce the definition of
Functional, Approximate and Purity Dependencies. In Section 3 we propose a
definition and a characterization of Similarity Dependencies with pattern
structures. Finally, Section 4 reports preliminary experimental results showing the
capabilities of our approach.
2
2.1</p>
      <p>Notation</p>
    </sec>
    <sec id="sec-2">
      <title>Functional, Approximate and Purity Dependencies</title>
      <p>We deal with datasets which are sets of tuples. Let U be a set of attributes
and Dom be a set of values (a domain). For the sake of simplicity, we assume
that Dom is a numerical set. A tuple t is a function t : U 7→ Dom and then
a table T is a set of tuples. Usually a table is presented as a matrix, as in the
table of Example 1, where the set of tuples (or objects) is T = {t1, t2, t3, t4} and
U = {a, b, c, d} is the set of attributes.</p>
      <p>The functional notation allows to associate an attribute with its value. We
define the functional notation of a tuple for a set of attributes X as follows,
assuming that there exists a total ordering on U . Given a tuple t ∈ T and
X = {x1, x2, . . . , xn} ⊆ U , we have:</p>
      <p>t(X) = ht(x1), t(x2), . . . , t(xn)i
In Example 1, we have t2({a, c}) = ht2(a), t2(c)i = h4, 4i. In this paper, the set
notation is usually omitted and we write ab instead of {a, b}.</p>
      <p>Example 1. This is an example of a table T = {t1, t2, t3, t4}, based on the set of
attributes U = {a, b, c, d}.</p>
      <p>id a b c d</p>
      <p>
        We are also dealing with the set of partitions of a set. Let S be any arbitrary
finite set, then, Part(S) is the set of all possible partitions that can be formed
with S. The set of partitions of a set is a lattice [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. We recall that partitions
can also be considered as equivalence classes induced by an equivalence relation.
      </p>
      <p>Now, we define the set of the “maximal subsets” of a set.</p>
      <p>Definition 1. Given a finite base set S and X = {X1, X2, . . . , Xn} a set of
subsets of S, a subset Xi is maximal in X if there does not exist any other
subset Xj in X such that Xi ⊂ Xj .</p>
      <sec id="sec-2-1">
        <title>Then XMax is the set of the maximal subsets of X.</title>
        <p>For example, let S = {a, b, c} and X = {{a, b}, {b, c}, {a}, {b}}. Then X is a
subset of ℘(S) the powerset of S, but not all elements of X are maximal subsets.
Indeed, XMax = {{a, b}, {b, c}}.</p>
        <p>Moreover, we define the function maxS which applies to a set of sets such as
X and returns the set of maximal subsets of X, i.e. XMax.</p>
        <p>Definition 2. Given a finite set S and a subset X = {X1, X2, . . . , Xn} of ℘(S),
the function maxS returns the set XMax of maximal subsets of X:
maxS (X) = XMax = {Xi ∈ X | @Xj ∈ X : Xi ⊂ Xj }
2.2</p>
        <p>Functional Dependencies</p>
        <sec id="sec-2-1-1">
          <title>We now introduce functional dependencies (FDs).</title>
          <p>
            Definition 3 ([
            <xref ref-type="bibr" rid="ref19">19</xref>
            ]). Let T be a set of tuples (or a data table), and X, Y ⊆ U .
A functional dependency (FD) X → Y holds in T if:
          </p>
          <p>∀t, t0 ∈ T : t(X) = t0(X) ⇒ t(Y ) = t0(Y )</p>
          <p>For example, the functional dependencies a → d and d → a hold in the table
of Example 1, whereas the functional dependency a → c does not hold since
t2(a) = t4(a) but t2(c) 6= t4(c).</p>
          <p>There is an alternative way of considering Functional Dependencies using
partitions of the set of tuples T . Taking a set of attributes X ⊆ U , we define the
partition of tuples induced by this set as follows.</p>
          <p>Definition 4. Let X ⊆ U be a set of attributes in a table T . Two tuples ti and
tj in T are equivalent w.r.t. X when:</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>Then, the partition of T induced by X is a set of equivalence classes:</title>
        <p>ti ∼ tj ⇐⇒ ti(X) = tj (X)
ΠX (T ) = {c1, c2, . . . , cm}</p>
        <p>For example, if we consider the table in Example 1, we have Πa(T ) =
{{t1, t3}, {t2, t4}}.</p>
        <p>Given X, ΠX (T ) is a partition or alternatively an equivalence relation. Then
we have:
1. S ΠX (T ) = T , for all X ⊆ U .
2. ci ∩ cj = ∅ for all ci, cj ∈ ΠX (T ), i 6= j.</p>
        <p>The classes in a partition induced by X are disjoint and they cover all the
tuples in T . The set of all partitions of a set T is Part(T ). We can also notice
that the set of partitions of any set Part(T ) induces an ordering relation ≤:
∀Pi, Pj ∈ Part(T ) : Pi ≤ Pj ⇐⇒ ∀c ∈ Pi : ∃c0 ∈ Pj : c ⊆ c0</p>
        <p>
          For example: {{t1}, {t2}, {t3, t4}} ≤ {{t1}, {t2, t3, t4}}. According to the
partitions induced by a set of attributes, we have an alternative way of defining the
necessary and sufficient conditions for a functional dependency to hold:
Proposition 1 ([
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]). A functional dependency X → Y holds in T if and only
if ΠY (T ) ≤ ΠX (T ).
        </p>
        <p>Again, taking the table in Example 1, we have that a → d holds and that
Πd ≤ Πa since Πa(T ) = {{t1, t3}, {t2, t4}} and Πd(T ) = {{t1, t3}, {t2, t4}}
(actually d → a holds too).
2.3</p>
        <p>
          Purity and Approximate Dependencies
Approximate Dependencies [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. In a table, Example 2. This table is an
exthere may be some tuples that prevent a func- cpeerrpatturoef
AthrechiAvveer4agferomDaTilyheTUemni-tional dependency from holding. Those tuples versity of Dayton, that shows the
can be seen as exceptions (or errors) for that de- fmeroenntthcaitvieersa.ge temperatures for
difpendency. Removing such tuples allows the
dependency to exist: then a threshold can be set to id Month Year Av. Temp. City
define a set of “approximate dependencies” hold- t1 1 1995 36.4 Milan
ing in a table. For example, a threshold of 10% tt32 51 11999966 6333..18 MRoilmane
means that all functional dependencies holding t4 5 1997 59.6 Rome
after removing up to 10% of the tuples of a ta- t5 1 1998 41.4 Dallas
ble are valid approximate dependencies. The set tt67 15 11999996 4864..85 HDoaulsltaosn
of tuples to be removed for validating a func- t8 5 1998 80.2 Houston
tional dependency does not need to be the same for each approximate
dependency. Considering in Example 2 the dependency M onth → Av.T emp, we can
check that 6 tuples should be removed before verifying the dependency: we keep
only one tuple for Month 1 and one tuple for Month 5 (actually just as if we
remove “duplicates”). Then, if the threshold is equal to or larger than 75%,
M onth → Av.T emp is a valid Approximate Dependency.
        </p>
        <p>
          Purity Dependencies [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ] are a generalization of the relationship between
partitions induced by the left-hand side and right-hand side of a functional
dependency. These dependencies are based on the relative impurity measure of two
partitions. In order to compute this impurity measure, we need a concave and
subadditive function defined on the interval [
          <xref ref-type="bibr" rid="ref1">0, 1</xref>
          ] (for example, the binary
entropy function). The intuition about this measure is that it computes how much
those partitions disagree, i.e. how far two partitions π and σ are from fulfilling
the relation π ≤ σ. If the impurity measure is zero (or close to zero), then π ≤ σ.
        </p>
        <p>
          For example, the impurity measure (details on this measure are given in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ])
of partition {{1, 2, 3}, {4, 5}} w.r.t. partition {{1, 2}, {3, 4, 5}} is 5.6, whereas the
impurity measure of partition {{1, 3}, {2, 5}, {4}} w.r.t. partition {{1, 2}, {3, 4, 5}}
is 8.2. In the first pair of partitions, only tuple 3 is misplaced, i.e. moving 3 from
one partition to another leads to the the same partitions, whereas in the
second example, the number of misplaced elements is larger (2, 3, and 4 should be
moved).
        </p>
        <p>An important feature of this measure is that if a partition is finer than
another, then, their relative impurity measure is exactly 0. This implies that a
purity dependency X → Y holds if and only if the relative impurity of ΠX (T )
w.r.t. ΠY (T ) is below a user-defined threshold. Therefore, if ΠY (T ) ≤ ΠX (T ), a
functional dependency is a valid purity dependency, regardless of the threshold.</p>
        <p>For example, we consider all the possible dependencies having the attribute
Average Temperature in their right-hand side. The purpose of this choice is to
find out which attributes determine the values of the average temperature (Av.
Temp.) in Example 2. Considering Approximate Dependencies, we introduce the
two metrics # Tuples and Percentage: # Tuples denotes the minimal number
of tuples that must be removed from the dataset for allowing the dependency to
hold, and Percentage denotes the percentage that # Tuples represents for the
whole dataset. For example, the Approximate Dependency M onth → Av.T emp
holds when we remove at least 6 (well-chosen) tuples, which represent 75% of
the whole dataset.</p>
        <p>Example 3. Dependencies with Average Temperature in their right-hand and the
metrics related to Approximate and Purity Dependencies.
#Tuples Percentage Purity
6 75% 12.98
1 12.5% 4.0
4 50% 4.0
3 37.5% 8.26
0 0% 0.0
4 50% 4.0</p>
        <p>
          As for the purity measure, we use the measure of relative entropy of two
partitions described in [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. If we examine the dependency M onth → Av.T emp,
we should the relative entropy of the partitions induced by Month and Av.
Temp., which are, respectively:
ΠMonth = {{t1, t2, t5, t6}, {t3, t4, t7, t8}}
ΠAv.T emp. = {{t1}, {t2}, {t3}, {t4}, {t5}, {t6}, {t7}, {t8}}
        </p>
        <p>Then, the relative entropy of ΠMonth and ΠAv.T emp. is 12.98, i.e. the largest
of the conditional entropies that are computed. Actually the number of tuples
that need to be reallocated for ΠAv.T emp. ≤ ΠMonth is significantly large. It
is also significant that the number of tuples that need to be removed for the
dependency Y ear, City → Av.T emp to hold is zero and that the relative
entropy of ΠY ear,City and ΠAv.T emp. is zero as well. The Functional Dependency
Y ear, City → Av.T emp holds because there is no pair of tuples ti, tj such that
ti(Y ear, City) = tj (Av.T emp.), i.e. there is no need to remove any tuple to verify
this dependency. In addition the relative entropy of ΠY ear,City and ΠAv.T emp.
is zero, because the partitions induced by both sides, ΠY ear,City and ΠAv.T emp
are exactly the same: {{t1}, {t2}, {t3}, {t4}, {t5}, {t6}, {t7}, {t8}}. Therefore, the
relation ΠY ear,City ≤ ΠAv.T emp holds, i.e. the relative entropy is zero and this
dependency trivially holds.</p>
        <p>Yet, the intuition about this dataset is that the “Average Temperature”
depends, to some extent, on the location and the month, i.e. given a city and a
month, we should be able to predict the average temperature. But this intuitive
relationship is somehow difficult to deduce with Approximate and Purity
Dependencies. For example, the metrics for the dependency M onth, City → Av.T emp
indicate that 4 tuples must be removed (50% of the dataset) for checking this
dependency, or alternatively, the relative entropy of the partitions ΠMonth,City and
ΠAv.T emp is 4.0. Considering the number of tuples, removing 50% of the whole
dataset is a lot, especially if the intuition tells that this dependency should hold.
Considering the entropy rate, the smallest entropy rate is zero and the largest
computed rate is 12.98. Thus, it seems difficult to deduce the right threshold in
each case.</p>
        <p>Instead of considering measures that deal with the sets of tuples as a whole,
dependencies could be directly related with the notion of “similarity”: if two
tuples have similar values for the attributes Month and City, then they should
have a similar value for the attribute Av. Temp. This can be interpreted as
follows: if two cities are close enough and the corresponding months are also
close enough, then the average temperature in the cities should be close enough
or “similar” as well. In such a context, “having similar values” depends on the
type of the attributes. For temperatures it mean that the absolute difference of
the values is less than a given threshold. For months, it could mean that they
are adjacent. For cities, it could mean that their locations are close enough.</p>
        <p>Such a kind of dependency would provide more control and a more intuitive
explanation of the relations existing between attributes.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Similarity Dependencies</title>
      <sec id="sec-3-1">
        <title>First, we define a tolerance relation in a set S:</title>
        <p>Definition 5. θ ⊆ S × S is a tolerance relation if:
1. ∀si ∈ S : siθsi (reflexivity)
2. ∀si, sj ∈ S : siθsj ⇐⇒ sj θsi (symmetry)
A tolerance relation is not necessarily transitive and induces blocks of tolerance:
Definition 6. Given a set S, a subset K ⊆ S, and a tolerance relation θ ⊆ S×S,
K is a block of tolerance of θ if:
1. ∀x, y ∈ K : xθy (pairwise correspondence)
2. ∀z 6∈ K, ∃u ∈ K : ¬(zθu) (maximality)</p>
        <p>All elements in a tolerance block are in pairwise correspondence, and the
block is maximal with respect to the relation θ. The set of all tolerance blocks
induced by a tolerance relation θ on the set S is denoted by S/θ (by analogy
with the notation of equivalence classes). S/θ is a set of maximal subsets of S
and as such, S/θ ∈ ℘(℘(S)). Thus we have:
Property 1. ∀Ki, Kj ∈ S/θ : Ki * Kj and Kj * Ki for all i 6= j</p>
        <p>Then, we define a partial ordering on the set of all possible tolerance relations
in a set S as follows:</p>
        <sec id="sec-3-1-1">
          <title>Definition 7. Let θ1 and θ2 two tolerance relations in the set S. We say that</title>
          <p>θ1 ≤ θ2 if and only if ∀Ki ∈ S/θ1 : ∃Kj ∈ S/θ2 : Ki ⊆ Kj</p>
          <p>This relation is a partial ordering and induces a lattice where the meet and
join operations of two tolerance relations θ1 and θ2, or, equivalently, on the sets
of blocks of tolerance of θ1 and θ2 are:</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>Definition 8. Let θ1 and θ2 two tolerance relations in the set S.</title>
          <p>θ1 ∧ θ2 = θ1 ∩ θ2 = maxS ({ki ∩ kj | ki ∈ S/θ1, kj ∈ S/θ2})
θ1 ∨ θ2 = θ1 ∪ θ2 = maxS (S/θ1 ∪ S/θ2)</p>
          <p>The meet θ1 ∧ θ2 is the set of pairwise intersections of all blocks in S/θ1 and
S/θ2, and then removing intersections that are not maximal. The join is simpler
as it consists in simply joining the blocks of tolerance in S/θ1 and S/θ2 and then
removing the unions that are not maximal.</p>
          <p>An example of a tolerance relation is the similarity that can be defined within
a set of integer values as follows. Given two integer values v1, v2 and a threshold
(user-defined): v1θv2 ⇐⇒ |v1 − v2| ≤ . For example, when S = {1, 2, 3, 4, 5}
and = 2, then S/θ = {{1, 2, 3}, {2, 3, 4}, {3, 4, 5}}. S/θ is not a partition as
transitivity does not apply.</p>
          <p>We now come back to the set of tuples T and the set of attributes M . For each
attribute m ∈ M , we define a tolerance relation on the values of that attribute:
θm. The set of tolerance blocks induced by the tolerance relation of the attribute
m is T /θm. All the tuples in a tolerance block K ∈ T /θm are similar one to the
other according to their values w;r.t. the attribute m.</p>
          <p>Example 4. Let us define a tolerance relation on an attribute m ∈ {a, b, c, d} as
follows: tiθmtj ⇐⇒ |ti(m) − tj (m)| ≤ .</p>
          <p>Now, assuming that = 1 in example 1, we have:</p>
          <p>T /θa = {{t1, t3}, {t2, t4}}, T /θb = {{t1, t2, t4}, {t3}}, T /θc = {{t1, t2, t3}, {t4}}
and S/θd = {{t1, t3}, {t2, t4}}.</p>
          <p>We can also extend this definition to sets of attributes. Given X ⊆ U , the
similarity relation θX is defined as follows:</p>
          <p>(ti, tj) ∈ θX ⇐⇒ ∀m ∈ X : (ti, tj) ∈ θm</p>
          <p>Two tuples are similar w.r.t. a set of attributes X if and only if they are
similar w.r.t. each attributes in X. We now can define a similarity dependency :
Definition 9. Let X, Y ⊆ U : X → Y is a similarity dependency iff: ∀ti, tj ∈
T : tiθX tj ⇒ tiθY tj</p>
          <p>In the case of a functional dependency, X → Y holds if and only if, for each
pair of tuples having the same value w.r.t. the attributes in X, then, they have
the same value w.r.t. the attributes in Y .</p>
          <p>In the case of a similarity dependency, X → Y holds if and only if, for each
pair of tuples having similar values w.r.t. the attributes in X, then, they have
similar values w.r.t. the attributes in Y .</p>
          <p>Example 5. We revisit the table in Example 4 and we define the tolerance
relation: tiθmtj ⇐⇒ |ti(m)−tj(m)| ≤ 2. Then the following similarity dependencies
hold: a → d, ab → d, abc → d, ac → d, b → d, bc → d, c → d.</p>
          <p>It is interesting to notice that b → d is a similarity dependency but not a
functional dependency, as t1(b) = t2(b) and t1(d) 6= t2(d). Because of the same
pair of tuples, the similarity dependency bcd → a does not hold, as t1θbcdt2 but
we do not have t1θat2, since |t1(a) − t2(a)| 2.</p>
          <p>By contrast, the functional dependency bcd → a holds because there is no
pair of tuples ti, tj such that ti(bcd) = tj(bcd).</p>
          <p>Example 6. Going back to example 2, let us compute the Similarity
Dependencies that hold and that have the attribute Av. Temp. in their right-hand side).</p>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>Holds N N Y</title>
        <p>N
N
N</p>
        <p>The only similarity dependency that holds is M onth, City → Av.T emp, using
the following similarity measures for each attribute: x θMonth y ⇐⇒ |x − y| ≤
0, x θY ear y ⇐⇒ |x − y| ≤ 0, x θCity y ⇐⇒ distance(x, y) ≤ 500 and
x θAv.T emp y ⇐⇒ |x − y| ≤ 10.</p>
        <p>The similarity imposes that the month and year must be the same, whereas
the distance between cities should be less than 500 kilometers and the difference
between average temperatures should be less than 10 degrees (all these values
are of course arbitrary).</p>
        <p>In particular, considering the tuples t1, t2: t1θMonth,Cityt2 since t1(M onth) =
t2(M onth) = h 1 i and t1(City) = t2(City) = h M ilan i. From the other side, we
have that t1θAv.T emp.t2 since |36.4 − 33.8| ≤ 10.</p>
        <p>
          Computing Similarity Dependencies with Pattern Structures
A pattern structure allows one to apply FCA directly on non-binary data [
          <xref ref-type="bibr" rid="ref9">9</xref>
          ].
Formally, let G be a set of objects, let (D, u) be a meet-semi-lattice of potential
object descriptions and let δ : G −→ D be a mapping associating each object
with its description. Then (G, (D, u), δ) is a pattern structure. Elements of D
are patterns and are ordered thanks to a subsumption relation v: ∀c, d ∈ D,
c v d ⇐⇒ c u d = c. A pattern structure (G, (D, u), δ) is based on two derivation
operators (·) . For A ⊆ G and d ∈ (D, u):
        </p>
        <p>A = l δ(g)
g∈A
d
= {g ∈ G|d v δ(g)}.</p>
        <p>These operators form a Galois connection between (℘(G), ⊆) and (D, u).
Pattern concepts of (G, (D, u), δ) are pairs of the form (A, d), A ⊆ G, d ∈ (D, u),
such that A = d and A = d . For a pattern concept (A, d), d is a pattern intent
and is the common description of all objects in A, the pattern extent. When
partially ordered by (A1, d1) ≤ (A2, d2) ⇔ A1 ⊆ A2 (⇔ d2 v d1), the set of all
concepts forms a complete lattice called pattern concept lattice.</p>
        <p>Thanks to the formalism of pattern structures, similarity dependencies can
be characterized (and computed) in an elegant manner. Firstly, the description
of an attribute m ∈ M is given by δ(m) = G/θm which is given by the set of
tolerance blocks w.r.t. θm and G = T . As tolerance relations can be ordered as
presented and discussed in Definitions 7 and 8, then descriptions can be ordered
within a lattice.</p>
        <p>Then, a dataset can be represented as a pattern structure (M, (D, u), δ)
where M is the set of original attributes, and (D, u) is the set of sets of blocks
of tolerance over G provided with the meet operation defined in Definition 8.</p>
        <p>An example of concept formation is given as follows. Starting from the set
{a, c} ⊆ M and assuming that tiθmtj ⇐⇒ |ti(m)−tj (m)| ≤ 2 for all attributes:
{a, c}
= δ(a) u δ(c) = {{t1, t3}, {t2, t4}} u {{t1, t2, t3}, {t4}}</p>
        <p>= {{t1, t3}, {t2}, {t4}}
{{t1, t3}, {t2}, {t4}}</p>
        <p>= {m ∈ M |{{t1, t3}, {t2}, {t4}} v δ(m)} = {a, c}</p>
        <p>This pattern concept lattice allows us to characterize all similarity
dependencies holding in M :
Proposition 2. A similarity dependency X → Y holds in a table T if and only
if: {X} = {XY } in the pattern structure (M, (D, u), δ).</p>
        <p>Proof. First of all, we notice that (t, t0) ∈ {X} if and only if t(X)θX t0(X), since
(t, t0) ∈ {X} if and only if ∀x ∈ X : t(x)θxt0(x), if and only if t(X)θX t0(X).
We also notice that {X, Y } ⊆ {X} .
(⇒) We prove that if X → Y holds in T , then, {X} = {X, Y } , that is,
{X} ⊆ {X, Y } . We take an arbitrary pair (t, t0) ∈ {X} , that is: t(X)θX t0(X).
Since X → Y holds, it implies that t(XY )θXY t0(XY ), and this implies that
(t, t0) ∈ {X, Y } .
(⇐) We take an arbitrary pair t, t0 ∈ T such that t(X)θX t0(X). Therefore,
we have that (t, t0) ∈ {X} , and by hypothesis, (t, t0) ∈ {XY } , that is:
t(XY )θXY t0(XY ). Since this is for all pairs t, t0 ∈ T such that t(X) = t0(X),
this implies that X → Y holds in T .
4</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Experiments</title>
      <p>
        Dataset description. Electronic sport denotes the extreme practice of video
games where so-called cyber-athletes compete in world-wide tournaments. As
for any sport, such professionals are surrounded by sponsors and practice within
professional teams. These professional games are even broadcast by
commentators over specialized TV channels [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. StarCraft II (Blizzard Entertainment)
is the most competitive video game. Since e-sport is a digital entertainment, one
can easily find game statistics and recording in great numbers on the Web. We
list more than 209, 000 games between two opponents and their associated
statistics (attributes). For each game, we derive two tuples (one for each of the players
involved). Each player in a game (tuple) is described by 31 attributes such as
his faction, the result, and several indicators of his game play.
      </p>
      <p>
        Experimental settings. The final dataset has about 400, 000 tuples described
by 31 attributes with different domain types (Boolean, qualitative, and
numerical). For attributes with Boolean or non-ordered qualitative domains, the
similarity parameters are set to 0 as for classical FDs, since we do not have similarity
constraints between their values. For the others, parameters are set by an expert
of the domain, helped with the distribution of that attribute values. Thanks to
the genericity of pattern structures, we slightly modified the very simplistic Java
version of CloseByOne used in [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] for extracting classical FDs. The only
modification lies in building the descriptions, i.e. producing tolerance blocks instead
of partitions over the set of objects. We experimented on 1.8GHz and 4GB of
RAM machines.
      </p>
      <p>Preliminary results. We build first several different sub-datasets with
randomly chosen set of tuples and different subsets of attributes. We report
execution times for extracting pattern concepts (and their count) to characterize
functional dependencies and similarity dependencies for three datasets in
Figure 1. We also report the average number of tolerance classes of each attribute
(that allows to build their description). In Figure 1 (a), the dataset is composed
of qualitative and not comparable attributes only. Thus, we set the similarity
parameters to 0 and observe that extracting FDs and SDs requires the same
amount of time and returns the same concepts (since setting the similarity
parameter to 0 leads to partitions). Naturally, the number of tolerance blocks is
high, corresponding to the cardinality of attribute domains. We added more
attributes, among which 5 numerical, and introduce the similarity parameters, see
Figure 1 (b) and (c). The number of tolerance blocks is still high since it is an
average for all attributes, and attribute domains are very dense. We notice that
there are more concepts to characterize SDs than FDs. This is due to our choice
of similarity parameters. Finally, we face memory issues when computing
pattern concepts for SDs, when the algorithms terminates for FDs. This is due to
our pattern implementations, i.e. how a pattern is represented in the memory.
We used striped partitions, i.e. not store any part of size 1, which can strongly
reduce the pattern size in memory. For FDs, this experimentally happens more
often than for SDs, due to the relaxation of the equality constraint. We need to
investigate other pattern implementations.</p>
      <p>100000
10000
t
oun 1000
C
100
10
100000
t 10000
n
u
o
C 1000
100
10
0
)(
s
e
m
it</p>
      <p>100000
t 10000
n
u
o
C 1000</p>
      <p>100
100 250 500 0100 5000 7500 00001 50000
(a) 8 attributes
800
700
600
500 )
400 (se
300 t
m
i
200
100
0
100 250 500 0100 5000 7500 00001 50000
(c) 17 attributes
We discussed how Functional, Approximate and Purity Dependencies may not
capture some relationships among attributes that intuitively exist in a dataset.
We presented alternatively Similarity Dependencies, to express relationships
between attributes based on a similarity measure that depends on the semantics of
each attribute. We showed that similarity dependencies are easily characterized
in FCA with pattern structures and we gave a preliminary experimental study.</p>
      <p>Future work is in concern with a deeper investigation of the best in-memory
pattern representations for fast and scalable computation, the introduction of a
minimal support as well as a qualitative evaluation of similarity dependencies.
Acknowledgments. This research work has been supported by the Spanish Ministry
of Education and Science (project TIN2008-06582-C03-01), EU PASCAL2 Network of
Excellence, and by the Generalitat de Catalunya (2009-SGR-980 and 2009-SGR-1428)
and AGAUR (grant 2010PIV00057).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>J.</given-names>
            <surname>Baixeries</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kaytoue</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Napoli</surname>
          </string-name>
          .
          <article-title>Computing functional dependencies with pattern structures</article-title>
          . In L. Szathmary and U. Priss, editors,
          <source>CLA</source>
          , volume
          <volume>972</volume>
          <source>of CEUR Workshop Proceedings</source>
          , pages
          <fpage>175</fpage>
          -
          <lpage>186</lpage>
          . CEUR-WS.org,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>M.</given-names>
            <surname>Baudinet</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Chomicki</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Wolper</surname>
          </string-name>
          .
          <article-title>Constraint-generating dependencies</article-title>
          .
          <source>J. Comput. Syst. Sci.</source>
          ,
          <volume>59</volume>
          (
          <issue>1</issue>
          ):
          <fpage>94</fpage>
          -
          <lpage>115</lpage>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>R.</given-names>
            <surname>Belohla</surname>
          </string-name>
          <article-title>´vek and V. Vychodil. Data tables with similarity relations: Functional dependencies, complete rules and non-redundant bases</article-title>
          . In M.-
          <string-name>
            <given-names>L.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <surname>K.-L. Tan</surname>
          </string-name>
          , and V. Wuwongse, editors,
          <source>DASFAA</source>
          , volume
          <volume>3882</volume>
          of Lecture Notes in Computer Science, pages
          <fpage>644</fpage>
          -
          <lpage>658</lpage>
          . Springer,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>L.</given-names>
            <surname>Bertossi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Kolahi</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L. V. S.</given-names>
            <surname>Lakshmanan</surname>
          </string-name>
          .
          <article-title>Data cleaning and query answering with matching dependencies and matching functions</article-title>
          .
          <source>In Proceedings of the 14th International Conference on Database Theory, ICDT '11</source>
          , pages
          <fpage>268</fpage>
          -
          <lpage>279</lpage>
          , New York, NY, USA,
          <year>2011</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>N.</given-names>
            <surname>Caspard</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Monjardet</surname>
          </string-name>
          .
          <article-title>The lattices of closure systems, closure operators, and implicational systems on a finite set: A survey</article-title>
          .
          <source>Discrete Applied Mathematics</source>
          ,
          <volume>127</volume>
          (
          <issue>2</issue>
          ):
          <fpage>241</fpage>
          -
          <lpage>269</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>A.</given-names>
            <surname>Day</surname>
          </string-name>
          .
          <article-title>The lattice theory of fonctionnal dependencies and normal decompositions</article-title>
          .
          <source>International Journal of Algebra and Computation</source>
          ,
          <volume>02</volume>
          (
          <issue>04</issue>
          ):
          <fpage>409</fpage>
          -
          <lpage>431</lpage>
          ,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>J.</given-names>
            <surname>Demetrovics</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Hencsey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Libkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and I. B.</given-names>
            <surname>Muchnik</surname>
          </string-name>
          .
          <article-title>Normal form relation schemes: A new characterization</article-title>
          .
          <source>Acta Cybern.</source>
          ,
          <volume>10</volume>
          (
          <issue>3</issue>
          ):
          <fpage>141</fpage>
          -
          <lpage>153</lpage>
          ,
          <year>1992</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>W.</given-names>
            <surname>Fan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Gao</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Jia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Li</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Ma</surname>
          </string-name>
          .
          <article-title>Dynamic constraints for record matching</article-title>
          .
          <source>The VLDB Journal</source>
          ,
          <volume>20</volume>
          (
          <issue>4</issue>
          ):
          <fpage>495</fpage>
          -
          <lpage>520</lpage>
          , Aug.
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>B.</given-names>
            <surname>Ganter</surname>
          </string-name>
          and
          <string-name>
            <given-names>S. O.</given-names>
            <surname>Kuznetsov</surname>
          </string-name>
          .
          <article-title>Pattern structures and their projections</article-title>
          . In H. S. Delugach and G. Stumme, editors,
          <source>Conceptual Structures: Broadening the Base, Proceedings of the 9th International Conference on Conceptual Structures (ICCS</source>
          <year>2001</year>
          ),
          <source>LNCS 2120</source>
          , pages
          <fpage>129</fpage>
          -
          <lpage>142</lpage>
          . Springer,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>B.</given-names>
            <surname>Ganter</surname>
          </string-name>
          and
          <string-name>
            <given-names>R.</given-names>
            <surname>Wille</surname>
          </string-name>
          .
          <source>Formal Concept Analysis</source>
          . Springer, Berlin,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. G. Graetzer,
          <string-name>
            <given-names>B.</given-names>
            <surname>Davey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Freese</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Ganter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Greferath</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Jipsen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Priestley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Rose</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Schmidt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Wehrung</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Wille</surname>
          </string-name>
          .
          <source>General Lattice Theory. Freeman</source>
          , San Francisco, CA,
          <year>1971</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>Y.</given-names>
            <surname>Huhtala</surname>
          </string-name>
          , J. Ka¨rkka¨inen, P. Porkka, and
          <string-name>
            <given-names>H.</given-names>
            <surname>Toivonen</surname>
          </string-name>
          . Tane:
          <article-title>An efficient algorithm for discovering functional and approximate dependencies</article-title>
          .
          <source>Computer Journal</source>
          ,
          <volume>42</volume>
          (
          <issue>2</issue>
          ):
          <fpage>100</fpage>
          -
          <lpage>111</lpage>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>M. Kaytoue</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          <string-name>
            <surname>Assaghir</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Napoli</surname>
            , and
            <given-names>S. O.</given-names>
          </string-name>
          <string-name>
            <surname>Kuznetsov</surname>
          </string-name>
          .
          <article-title>Embedding tolerance relations in formal concept analysis: an application in information fusion</article-title>
          . In J. Huang,
          <string-name>
            <given-names>N.</given-names>
            <surname>Koudas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. J. F.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Collins-Thompson</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <surname>A</surname>
          </string-name>
          . An, editors,
          <source>CIKM</source>
          , pages
          <fpage>1689</fpage>
          -
          <lpage>1692</lpage>
          . ACM,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>D.</given-names>
            <surname>Simovici</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Jaroszewicz</surname>
          </string-name>
          .
          <article-title>An axiomatization of partition entropy</article-title>
          .
          <source>Information Theory</source>
          , IEEE Transactions on,
          <volume>48</volume>
          (
          <issue>7</issue>
          ):
          <fpage>2138</fpage>
          -
          <lpage>2142</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>D. A.</given-names>
            <surname>Simovici</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Cristofor</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Cristofor</surname>
          </string-name>
          .
          <article-title>Impurity measures in databases</article-title>
          .
          <source>Acta Inf.</source>
          ,
          <volume>38</volume>
          (
          <issue>5</issue>
          ):
          <fpage>307</fpage>
          -
          <lpage>324</lpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <given-names>S.</given-names>
            <surname>Song</surname>
          </string-name>
          and
          <string-name>
            <given-names>L.</given-names>
            <surname>Chen</surname>
          </string-name>
          .
          <article-title>Efficient discovery of similarity constraints for matching dependencies</article-title>
          .
          <source>Data &amp; Knowledge Engineering</source>
          , (
          <volume>0</volume>
          ):-,
          <year>2013</year>
          . (in press).
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>S.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Chen</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P. S.</given-names>
            <surname>Yu</surname>
          </string-name>
          .
          <article-title>Comparable dependencies over heterogeneous data</article-title>
          .
          <source>The VLDB Journal</source>
          ,
          <volume>22</volume>
          (
          <issue>2</issue>
          ):
          <fpage>253</fpage>
          -
          <lpage>274</lpage>
          , Apr.
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <given-names>T. L.</given-names>
            <surname>Taylor</surname>
          </string-name>
          . Raising the Stakes:
          <article-title>E-Sports and the Professionalization of Computer Gaming</article-title>
          . MIT Press,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <given-names>J.</given-names>
            <surname>Ullman</surname>
          </string-name>
          .
          <article-title>Principles of Database Systems and Knowledge-Based Systems, volumes 1-2</article-title>
          . Computer Science Press, Rockville (MD), USA,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>