<!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>Exploring the Dataset Structure by Means of Delta-Classes of Equivalence. The Case of the Titanic Dataset ?</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Aleksey Buzmakov</string-name>
          <email>avbuzmakov@hse.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Sergei O. Kuznetsov</string-name>
          <email>skuznetsov@hse.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tatyana Makhalova</string-name>
          <email>tatiana.makhalova@inria.fr</email>
          <xref ref-type="aff" rid="aff0">0</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>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>LORIA (CNRS - Inria NGE - University of Lorraine)</institution>
          ,
          <addr-line>Vandoeuvre-l`es-Nancy</addr-line>
          ,
          <country country="FR">France</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Research University Higher School of Economics</institution>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Being able to have a quick look at a dataset is essential in many applications. One way is to summarize the dataset by means of a small set of patterns. In this paper we suggest defining such set of patterns as the closed elements of delta-classes of equivalence. This approach allow us to propose an overview of a dataset and then, if necessary, any delta-class of equivalence can be expanded to provide more detailed information about a certain part of the dataset. To demonstrate our proposal we deeply studied the Titanic dataset about survival of passengers and showed the connections between the passenger attributes and a possible dataset summary in terms of patterns.</p>
      </abstract>
      <kwd-group>
        <kwd>FCA</kwd>
        <kwd>Δ-closure</kwd>
        <kwd>Δ-concepts</kwd>
        <kwd>use case</kwd>
        <kwd>Δ-implications</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>
        In this paper, we are interested in pattern or itemset mining in tabular data.
There is a considerable amount of work on many aspects of this subject,
especially regarding algorithms and search for interesting patterns [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. One recurrent
problem in itemset mining is the exponential number of resulting itemsets.
Focusing on closed itemsets allows a significant reduction of this number by replacing
a whole class of itemsets with the largest one, i.e., the closed itemset, which has
the same support [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Nowadays, there are very efficient algorithms for
computing frequent closed itemsets [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], even for low frequency thresholds. However, the
efficient generation of closed itemsets only partially solves the problem of the
exponential explosion of itemsets, since the main difficulties appear afterwards,
when the generated itemsets are processed.
      </p>
      <p>
        An alternative to the exhaustive enumeration of itemsets is based on
“sampling” [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] and on a gradual search for itemsets according to an interestingness
measure or a set of constraints [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. Such algorithms usually result in a rather
? The reported study was funded by RFBR, project number 20-31-70047
small set of itemsets while they may provide only an approximate solution.
Although both approaches use quite different techniques, they rely on the same
assumption, namely that the “internal or intrinsic structure” of the dataset
under study can be understood by means of subset of selected itemsets.
      </p>
      <p>Then, in each approach a particular set of itemsets is returned, which provides
a “multifaceted view” of the intrinsic structure underlying the data.</p>
      <p>Our approach is based on Δ-classes of equivalence, the generalization of
standard classes of equivalence based on closure operator. A user-set parameter Δ
measures how much a closed set can differ from its upper neighbors in the partial
order of closed sets.</p>
      <p>A Δ-class of equivalence allows one to characterize the distribution
underlying the data, i.e., when Δ is large, there are only a few Δ-classes of equivalence
whose elements are very stable, while when Δ is small, the number of Δ-classes
increases and the related information becomes less stable. Moreover, the
Δclasses of equivalence are very stable for large Δ and do not significantly depend
on the data sampling used for the analysis.</p>
      <p>In this paper we study Δ-classes for Titanic dataset. In particular, we show
what kind of conclusions w.r.t. the passengers of Titanic can be made. Further we
study what kind of information can be stored in “implications” of the Δ-classes
of equivalence. In particular, such implications can show what information is
usually associated with a set of attributes.</p>
      <p>The paper has the following structure. First we introduce basic definitions
related to generalized closure operator. Then in Section 3 we evaluate this closure
operator on Titanic dataset.
2</p>
      <p>
        Δ-classes of equivalence
The proposed approach is introduced in terms of Formal Concept Analysis
(FCA) [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] and the following notation. A formal context is a triple (G, M, I),
where G and M are sets of objects and attributes correspondingly and I ⊆ G×M
is a relation between them. Derivation operator is denoted with arrows in order
to clearly show the range and domain of the corresponding mappings:
A↑ = {m ∈ M | (∀g ∈ A)(g, m) ∈ I}, A ⊆ G
B↓ = {g ∈ G | (∀m ∈ B)(g, m) ∈ I}, B ⊆ M
(1)
(2)
      </p>
      <p>We should note that operators (·)↑↓ and (·)↓↑ form closure operators on 2G
and 2M , respectively. Hereafter, we focus on the operator (·)↓↑ and its
generalizations. Let us reformulate the definition in terms of “instance counting”. Let
B be any set of attributes.</p>
      <p>Definition 1. An attribute set B is closed iff (∀m ∈ M \B)|(B ∪{m})↓| 6= |B↓|.
It can be seen that (·)↓↑ maps any set of attributes to a closed set of attributes.
Let us reformulate Definition 1 in the following equivalent way. B is closed iff
(∀m ∈ M \ B)[|B↓| − |(B ∪ {m})↓| ≥ 1].</p>
      <p>|B↓| − |(B ∪ {m})↓| ≥ Δ ≥ 1.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] it was shown that Δ-closedness is a closure operator. In particular
it means that from a computational point of view, given a non Δ-closed set
of attributes B, i.e., ∃m ∈ M (|B↓| − |(B ∪ {m})↓ &lt; Δ), it can be closed by
iteratively changing B to B ∪ {m}, for any m violating (3) until such attribute
is not found. The corresponding closure operator is denoted by (·)Δ. Since it is a
closure operator, it divides all sets of attributes 2M into classes of equivalences
having the same closure.
      </p>
      <p>
        Definition 3. Given an attribute set B, its equivalence class EquivΔ(B) is the
set of all attribute sets with the closure equal to the closure of B, i.e.,
This form allows changing the threshold 1 at the end of the formula to any other
positive value. The larger this value, the less attribute sets would pass a test
similar to the one from Definition 1. This leads to the definition of Δ-closedness
of an attribute set [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
      <p>Definition 2. A set of attributes B is called Δ-closed if for any m ∈ M :
(3)
(4)
(5)
(6)</p>
      <p>EquivΔ(B) = {X ⊆ M | (X)Δ = (B)Δ}.</p>
      <p>Moreover, since according to Definitions 1 and 2 if a set of attributes is
Δ-closed than it is necessary closed. Thus, these Δ-classes of equivalence are
joins of several closure-based classes of equivalence. It allows introducing a new
derivation operator related to Δ-closure.</p>
      <p>A↑Δ = (A↑)Δ, A ⊆ G</p>
      <p>B↓Δ = (B)Δ↓, B ⊆ M</p>
      <p>The new Δ-derivation operator allows defining Δ-concepts ordered within a
lattice in the similar way to the classical formal concepts. Moreover, since any
Δ-closed set of attributes is a closed set of attributes, than the set of Δ-concepts
are subset of formal concepts and the order of Δ-concepts is a suborder of the
corresponding formal lattice.</p>
      <p>Finally, we should discuss Δ-implications since they provide a useful tool for
finding associations between attribute sets.</p>
      <p>Definition 4. A rule A → B is called Δ-implication if B = AΔ \ A, i.e., A and
Δ
A ∪ B are from the same Δ-class of equivalence.</p>
      <p>Since Δ-closure can change the support of the attribute set a Δ-implication
is not necessary an implication. However, the set of Δ-implications is subset of
all association rules, thus they are more easy analysable. In particular, given an
implication A → B, the set B is the set of attributes that are associated with A
in most samples from the underlying distribution.</p>
      <p>
        In the next section we experimentally show how such lattices of Δ-concepts
and the corresponding implications can be used for data analysis. Moreover,
since Δ-concepts can be found in polynomial time3 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], such analysis is suitable
for processing really big data.
3
3.1
      </p>
    </sec>
    <sec id="sec-2">
      <title>Evaluation</title>
      <sec id="sec-2-1">
        <title>Dataset</title>
        <p>In this paper we use Titanic dataset downloaded (train dataset) from Kaggle4.
This is one of the most known datasets with easily interpretable patterns that
do not require deep diving into the domain knowledge. The dataset describes
891 passengers of the last Titanic ship travel. Every passenger is described with
name, age, sex, the number of parents and/or children and the number of spouse
and/or siblings travelled together with the passenger. The ticket price and the
ticket class is also known as well as the survival state of the passenger after the
Titanic shipwreck.</p>
        <p>All numerical data is divided into 5 percentiles and then inter-ordinal scaling
is used on top of these percentiles. For example, for the quantity Age it is known
from the data that 51 of the passengers were below 19 years old, the next 15
between 19 and 25, then between 25 and 32 and then between 32 and 41 and
finally the last 15 of the passengers were above 41 years old. Then new binary
attributes are formed based on these limits (19, 25, 32,41), these eight attributes
are “Age ≥ 19,” “Age ≤ 19”. “Age ≥ 25,” “Age ≤ 25”. “Age ≥ 32,” “Age ≤ 32”.
“Age ≥ 41,” “Age ≤ 41”.</p>
        <p>Additionally, from the ”Name” field the social status is extracted, including
”Mr”, ”Mrs”, ”Master”, etc. It makes in total 49 attributes.
3.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Concept lattice navigation</title>
        <p>Even for such relatively simple data the total number of concepts is 9002. It is
not hard to build such a lattice. However, analysis of the lattice is quite hard.
It is hardly possible to draw the whole lattice and the only way is to navigate
it from the top or from the bottom concepts. However, Δ-classes of equivalence
give another means for such analysis and navigation.</p>
        <p>Let us first increase the Δ threshold for the lattice. If Δ = 90, then the
lattice size is only 11 and it can be drawn. It is shown in Figure 1. For every
concept the corresponding extent size and Δ-measure are shown. Every attribute
is shown outside of the concept with an arrow attached to the concept of the first
attribute entry. It can be seen that the lattice involves only 9 attributes out of
49. All other attributes are attached to the BOTTOM concept and are not shown. It
3 Being more precise the enumeration procedure can be set in such a way, that it
finishes in input-polynomial time. It is achieved by iteratively increasing the threshold
θ if the number of the already found patterns is too large. The result is the set of all
patterns with Δ ≥ θ. However, if θ is automatically set to be too high, the procedure
still finishes in input-polynomial time but the result set is empty.
4 https://www.kaggle.com/c/titanic
means that starting for any attribute a from this set, one has Δ({a}↓) &lt; 90, i.e.,
smaller than the threshold. For example, the attribute fare ≥ 8 is introduced to
the lattice at the very top concept. It means that |∅↓| − |{fare ≥ 8}↓| &lt; 90, i.e.,
for most of objects fare ≥ 8. Moreover, since the top concept in this lattice has
the maximal value of Δ, its extent is the most typical extent for all passengers.
Since we cannot make it more precise without excluding less objects than 175.</p>
        <p>Then we can see that there are 5 concepts below the top concept. They are the
only concepts that are significantly different from their children. Accordingly, this
concept lattice for Δ = 90 shows the structure of different groups of passengers
(formal concepts with Δ-closure for Δ = 90. A concept is only shown if there is
no more precise description that contains similar number of objects.</p>
        <p>This setting allows finding and prioritizing the association rules related to a
certain set of attributes.
Let us study female subpopulation of the passengers. In particular, we can try to
Δ-close the following description sex = female. What Δ should be used? One
of the reasonable choice is the maximal Δ such that Δ-closure of sex = female
is different from M . For example in Figure 1 no concept with sex = female
is found. It means that for Δ ≥ 90, {sex = female}↓↑Δ = M . If the whole
lattice is available it corresponds to the concept with the maximal Δ-measure
such that the intent of the concept is a superset of {sex = female}. In the form
of Δ-implication it can be written as5:</p>
        <p>{sex = female} →Δ {fare ≥ 10}.</p>
        <p>It suggests that women rarely buy cheapest tickets. Moreover, since we do
not find class ≤ 2 attribute, it means that they can afford the 3rd class, but
nevertheless not the cheapest tickets. What about men?</p>
        <p>{sex = male} →Δ {title = Mr, fare ≥ 8}.</p>
        <p>Now we see that the preference for more expensive tickets is missing. However,
we see that most of the men are titled ”Mr”. It is not the classical closure
assuming that all men are Mr. Indeed, the correspondence between the title and
sex is shown in Table 1.
{title = Master} →Δ {sex = male, age ≤ 19, fare ≥ 10, class ≥ 2}.
We can see, that Master corresponds to young men from 2nd and 3rd class but
not with the cheapest tickets. It is a quite strange combination and a deeper
investigation is needed. However, it is not an artefact of the procedure. If we
check the original dataset all findings are supported, i.e., they are mostly from
the 2nd and 3rd class, but not so cheap. The proposed procedure was useful here
only for highlighting such finding. In contrast, for Miss-title no new information
is found.</p>
        <p>Let us now formulate a question about women that had cheap tickets:
{sex = female, fare ≤ 10} →Δ {title = Miss, class = 3, fare ≤ 8}.
In fact if decision is to travel cheap, then it is the cheapest option. Similar,
answer will be given for men traveled cheap. However, the group of men that
traveled cheep is about 7 times larger than the group of women. Thus, if we
would have just requested ”who traveled cheap”, than the result would be the
group of men.</p>
        <p>Finally, let us ask how age affects the travel behavior.</p>
        <p>{age ≤ 25} →Δ {class ≥ 2, 8 ≤ fare ≤ 40}.
5 For simplicity, the attribute sets are shown with reduction, i.e., if by knowing that
fare ≥ 10 we can conclude that fare ≥ 8, the last attribute is not shown.
Thus, young people usually travel in the 2nd or 3d class. Similarly, for people
aged more than 41 years.</p>
        <p>{age ≥ 41} →Δ {class ≤ 2, fare ≥ 22},
i.e., such people usually prefer the 1st or 2nd class and the fare is more than 22.</p>
        <p>Let us finally show that we can be interested also in combinations of
attributes. For example, what about women of age more than 41 years?
{age ≥ 41, sex = female} →Δ {class = 1, fare ≥ 40, title = Mrs}
So in contrast to generally aged people, women usually travel in the 1st class
and they are titled Mrs.
4</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Conclusion</title>
      <p>
        Based on Titanic dataset Δ-classes of equivalence are shown to be useful for
exploratory data analysis. In particular, it can be used to systematize the dataset
and to prioritize association rules related to certain requests, e.g., every
attribute can be associated with the most frequent attributes taken into account
co-occurrences of the attributes. Since, Δ-classes of equivalence can be found
in polynomial time [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], such approach is suitable for very large datasets.
Moreover, such approach focuses on the distribution, where the dataset is taken from,
rather than the dataset itself.
      </p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Aggarwal</surname>
          </string-name>
          , C.C.,
          <string-name>
            <surname>Han</surname>
            ,
            <given-names>J</given-names>
          </string-name>
          .:
          <source>Frequent pattern mining</source>
          . Springer (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Boley</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          , Horva´th,
          <string-name>
            <given-names>T.</given-names>
            ,
            <surname>Wrobel</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Efficient discovery of interesting patterns based on strong closedness</article-title>
          .
          <source>Statistical Analysis and Data Mining: The ASA Data Science Journal</source>
          <volume>2</volume>
          (
          <issue>5-6</issue>
          ),
          <fpage>346</fpage>
          -
          <lpage>360</lpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Buzmakov</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kuznetsov</surname>
            ,
            <given-names>S.O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Napoli</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Fast generation of best interval patterns for nonmonotonic constraints</article-title>
          .
          <source>In: Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases</source>
          . pp.
          <fpage>157</fpage>
          -
          <lpage>172</lpage>
          . Springer (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Dzyuba</surname>
            , V., van Leeuwen,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>De Raedt</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Flexible constrained sampling with guarantees for pattern mining</article-title>
          .
          <source>Data Mining and Knowledge Discovery</source>
          <volume>31</volume>
          (
          <issue>5</issue>
          ),
          <fpage>1266</fpage>
          -
          <lpage>1293</lpage>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Ganter</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wille</surname>
          </string-name>
          , R.:
          <article-title>Formal concept analysis-mathematical foundations (</article-title>
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>Q.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Imielinski</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Alpine: Progressive itemset mining with definite guarantees</article-title>
          .
          <source>In: Proceedings of the SIAM International Conference on Data Mining</source>
          . pp.
          <fpage>63</fpage>
          -
          <lpage>71</lpage>
          . SIAM (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Pasquier</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bastide</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Taouil</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lakhal</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Efficient mining of association rules using closed itemset lattices</article-title>
          .
          <source>Information systems 24(1)</source>
          ,
          <fpage>25</fpage>
          -
          <lpage>46</lpage>
          (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Smets</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vreeken</surname>
          </string-name>
          , J.: Slim:
          <article-title>Directly mining descriptive patterns</article-title>
          .
          <source>In: Proceedings of the 12 SIAM International Conference on Data Mining</source>
          , Anaheim, California. pp.
          <fpage>236</fpage>
          -
          <lpage>247</lpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>