<!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>A Tool for Creating and Visualising Formal Concept Trees</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Simon Andrews</string-name>
          <email>s.andrews@shu.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Laurence Hirsch</string-name>
          <email>l.hirsch@shu.ac.uk</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Conceptual Structures Research Group Communication and Computing Research Centre Faculty of Arts, Computing, Engineering and Sciences Sheffield Hallam University</institution>
          ,
          <addr-line>Sheffield</addr-line>
          ,
          <country country="UK">UK</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>This paper presents a tool for creating and visualising formal concept trees. The concept tree provides an alternative visualisation to the more commonly known concept lattice. The tool described here is an extension of the In-Close formal concept mining program, where concepts are output in a format that can be visualised in a Web Browser using the Collapsible Tree Layout from the D3.js JavaScript library. Because the visualisation is expandable and collapsible, the tool is able to deal with large trees and the user is able to explore branches with single mouse clicks and by panning and zooming the tree. So-called 'iceberg trees' can also be produced, by specifying a minimum support for objects.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        There are a number of tools that visualise and explore formal concept lattices,
such as the well known Concept Explorer [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] and others including ToscanaJ
[
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], Conflexplore [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], FcaStone/Graphviz [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] and Galicia [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. However, there
are, as far as we know, no similar tools to visualise and explore formal
concept trees. Although the concept lattice is the natural and primary means of
visualisation in FCA, the concept tree is a useful alternative, often easier to
digest (particularly by non-FCA speakers) and particularly appropriate for
situations where the underlying information structure is a tree, such as a
taxonomy or a decision tree. Although there are several publications that show the
creation and application of formal concept trees, such as [
        <xref ref-type="bibr" rid="ref10 ref14 ref5">5,10,14</xref>
        ], the
visualisations therein have been created bespoke for the work concerned rather than
generated by an automated tool.
      </p>
      <p>There is also a problem in concept lattices regarding size and complexity: a
lattice soon becomes too large and too complex to read and manage, or even
compute, and although most of the lattice visualisation tools listed above have
some means or other of attempting to address the problem (such as de-selecting
attributes and objects in Concept Explorer), none of them are not really capable
of handling a large number of concepts, either producing a ‘bird’s nest’ of
indecipherable nodes and arcs, or simply unable to compute the structure in the
first place.</p>
      <p>
        This paper presents a tool that creates formal concept trees from formal
contexts and visualises them using the Collapsible Tree Format from the D3.js
JavaScript library. The tree is created as an output from a modified version of
the fast concept miner, In-Close2 [
        <xref ref-type="bibr" rid="ref1 ref2 ref3">1,3,2</xref>
        ]. The modification allows In-Close2 to
output formal concepts in the D3 Collapsible Tree JSON file format, so that
they can be visualised as a tree in a Web-Browser. With simple controls for
expanding and collapsing nodes of the tree, the tool is easy to use and the trees
produced are easy to explore. Also, because the tree is collapsible and
expandable, and because In-Close2 is capable of quickly computing large numbers of
concepts, it is possible to create, manage and explore large concept trees; the
limitation being only on the JavaScript to deal with very large JSON files.
      </p>
      <p>The following sections describe the use of these two components with some
well known FCA examples as illustration.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Concept Trees</title>
      <p>
        A tree, as a formal structure, is a set of nodes connected by arcs, such that each
node has a single parent node. A lattice can be thought of as a collection of
overlapping trees [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] where nodes with multiple parents have their connecting
arcs reduced to leave single parents. In terms of connections between formal
concepts in a concept lattice, where an arc is removed to form a corresponding
tree, any inherited objects and attributes that are lost by removing the
connection must be restored to the child and parent concepts whose connection has
been removed. Thus the concepts in the lattice and the tree are exactly the same
- only the number of connections have been reduced. Figure 1 is a simple
example showing a concept lattice on the left and a corresponding concept tree on the
right. The attributes in each case are a1; a2; a3; a4 and the objects o1; o2; o3; o4.
Notice how attribute a3 and object o4 are labeled twice, to as to maintain the
intents and extents of the concepts whose connection has been severed in the
creation of the tree.
      </p>
      <p>The latest version of In-Close, In-Close2.8, has the facility to output formal
concept trees in JSON format for the D3.js Collapsible Tree Layout 1. The input
for the process is a formal context in the well-known Burmeister cxt format.
The tree format is simply one of the output options presented to the user when
In-Close2.8 is run. Figure 2 shows the Command Line interface with the well
known formal context Live-in-water being used as an example.</p>
      <p>
        It is worth noting that, although concept trees have been described above as
originating from lattices that have had arcs removed, this is not how In-Close
creates a concept tree. In-Close does not compute the lattice at all, it simply
computes the first occurrence of each child concept, in the manner of
Close-byOne type algorithms [
        <xref ref-type="bibr" rid="ref8 ref9">9,8</xref>
        ], and ignores subsequent computations of the same
child, thus not creating any connections to further parents. Whereas previous
publications concerning the creation of concept trees have discussed different
1 https://bl.ocks.org/mbostock/4339083
approaches to ‘pruning’ lattice arcs to make trees, using In-Close involves no
such decision making - the tree created depends only on the order in which it
computes formal concepts from the formal context it is provided with.
      </p>
      <p>The concept tree is output as a file called concepts.json ready to be
uploaded to the JavaScript program.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Visualising the Concept Tree</title>
      <p>The JavaScript program can be opened in a browser that supports HTML5 (e.g.
Chrome but not Internet Explorer). The concepts.json file is uploaded and
visualised using the ‘Choose File’ and ’Upload-&gt;Draw Tree’ buttons, see Figure
3. By default, the tree is initially displayed to the first level of concepts below
the top concept. Figure 3 shows a concept tree created from the well-known
Live-in-water context.</p>
      <p>The concepts are numbered with the top concept being number 0. Concepts
are labeled with attributes (upper line) and objects (lower line). If the concept
is filled in with colour, it means that it can be expanded to another level in
the tree by clicking the concept. Clicking concept 2 in the Live-in-water
example expands it as shown in Figure 4, revealing more specialised sub-concepts
that introduce more attributes. Notice that the objects ‘move’ from concept 2 to
become labeled at the appropriate sub-concept. Thus ‘frog’ and ‘dog’ are now
labeled at concept 8 since, as well as living on land, they can move and they
have limbs.</p>
      <p>Clicking on an un-filled concept will collapse the tree to that concept. Thus
clicking now on concept 2 will collapse concepts 7 and 8 back up to it, restoring
concept 2 to its state in Figure 3. Clicking on the top concept (concept 0) will
collapse the tree to a single node.</p>
      <p>To aid the user in exploring and managing the tree, holding a mouse button
down allows the tree to be dragged anywhere in the Browser window and the
mouse wheel can be used to zoom in and out.</p>
      <p>When reading the concept tree, the normal rules of attribute and object
inheritance apply: attributes are inherited down the branches of the tree, objects
are inherited up the branches. Thus, again looking at concept 2 in Figure 4, the
objects that need water to live and live on land are frog, dog, corn, reed and
bean. Looking at concept 8, frog and dog can move, have limbs, live on land
and need water to live.</p>
      <p>Figure 5 shows the Live-in-water concept tree fully expanded (a result most
quickly achieved by selecting the ‘Fully Expanded’ option before uploading the
tree).</p>
      <p>When reading a formal concept tree it is important to realize that attributes
and objects can be labeled more than once, something not present in a lattice
where the the requisite ‘many-to-many’ connections ensure they are labeled
only once. Nevertheless, the concepts in a concept tree are exactly the same
concepts as those in the corresponding concept lattice.</p>
      <p>The tree is best read from top to bottom in a manner of attribute exploration,
or specialization, of concepts. Thus, in Figure 5, concept 0 contains all the
objects that need water to live, concept 4 contains all the objects that need water
to live and can move, and concept 5 contains all the objects that need water to
live and can move and have limbs. However, concept 5 does not necessarily tell</p>
      <p>Fig. 5. Fully Expanded Live-in-water Concept Tree
you about other attributes its objects may have. For example, a frog can also
live in water (concept 1) and a dog can also live on land (concept 2). Although
this issue is also present when reading a lattice, the extra connections in the
lattice allow a user to determine those other attributes more easily. But, so long
as this limitation is kept in mind, the concept tree is still a useful and readable
visualisation.</p>
    </sec>
    <sec id="sec-4">
      <title>4 ‘Iceberg Trees’</title>
      <p>
        The idea of a formal concept ‘iceberg’ lattice was described by [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] as being
a lattice where a minimum support has been applied, in terms of a minimum
number of objects allowed in a concept. The original lattice is thus pruned of
some of its lower concepts, reducing its size and complexity. However, the
result of applying such minimum support to a lattice does not, strictly speaking,
produce a lattice: the top portion remains as a lattice structure, but where it
has been pruned there may be ‘hanging branches’, no longer connected by the
pruned concepts. The same problem is not true of the ‘iceberg tree’: applying
minimum support to a concept tree will simply produce a smaller tree. Such
‘iceberg trees’ are easily created using In-Close2.8 by specifying a minimum
support before concept mining is carried out. Figure 6 shows the Live-in-water
example with a minimum support of three objects - any concept with fewer
than three objects has been pruned from the original Live-in-water tree.
Taking concept 2, for example, concepts 8 and 9 from the full tree in Figure
5 have gone, and their objects (frog and dog) are now labeled at concept 2. It is
important that such objects are not lost by the pruning and In-Close takes care
of this by retaining objects as a concept’s ‘own objects’ if they otherwise would
belong to sub-concepts that don’t satisfy the minimum support.
5
      </p>
    </sec>
    <sec id="sec-5">
      <title>Managing Large Trees</title>
      <p>
        Although pruning using minimum support will reduce the size of a tree,
information, of course, will be lost. However, every tree, no matter how large,
begins with a single node, and, so, with expandability and collapsibility, it
becomes possible to manage very large trees, expanding and exploring branches
of interest whilst leaving the rest of the tree hidden. Figure 7 shows a small
portion of a concept tree generated from the well known ‘mushroom’ data set from
UCI [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. Altogether the tree has over 225,000 nodes and, although this would
      </p>
      <p>Fig. 7. Portion of the ‘mushroom’ Concept Tree
clearly not be sensible to display in its entirety, the JavaScript program is able
to store and manage the entire tree.</p>
      <p>Notice that instead of displaying individual objects, the option to show
‘object count’ has been used, displaying the number of objects in a concept and
the corresponding percentage of the population. The objects in this example
are simply instances in a data set, so displaying long lists of their ID numbers
makes little sense. The analyst is more interested in the statistical evidence of
how attributes are distributed.
6</p>
    </sec>
    <sec id="sec-6">
      <title>Conclusion</title>
      <p>The concept tree tool is an addition to the FCA library of tools and provides a
new automated approach to visualisation in FCA. Although the concept lattice
is the natural visualisation of a concept hierarchy, the tree is a useful alternative
that has not previously been provided in a tool. Trees are easily created from
formal contexts using the In-Close2 concept miner and easily visualised in a
Web Browser using the D3.js Collapsible Tree layout. The tool is able to manage
trees with hundreds of thousands of nodes since size and complexity is dealt
with by the expandable and collapsible nature of the layout and by the ability
to prune trees by specifying a minimum support for objects in In-Close2.</p>
      <p>The modified In-Close2 program is available at SourceForge 2 and the
JavaScript program to visualise the tree in a Web-Browser can be accessed via the
Web 3.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>S.</given-names>
            <surname>Andrews</surname>
          </string-name>
          .
          <article-title>In-close2, a high performance formal concept miner</article-title>
          . In S. Andrews,
          <string-name>
            <given-names>S.</given-names>
            <surname>Polovina</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Hill</surname>
          </string-name>
          , and B. Akhgar, editors,
          <source>Conceptual Structures for Discovering Knowledge - Proceedings of the 19th International Conference on Conceptual Structures (ICCS)</source>
          , pages
          <fpage>50</fpage>
          -
          <lpage>62</lpage>
          . Springer,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>S.</given-names>
            <surname>Andrews</surname>
          </string-name>
          .
          <article-title>A partial-closure canonicity test to increase the efficiency of cbo-type algorithms</article-title>
          .
          <source>In Proceedings of the 21st International Conference on Conceptual Structures</source>
          , pages
          <fpage>37</fpage>
          -
          <lpage>50</lpage>
          . Springer,
          <year>2014</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>S.</given-names>
            <surname>Andrews</surname>
          </string-name>
          .
          <article-title>A best-of-breed approach for designing a fast algorithm for computing fixpoints of galois connections</article-title>
          .
          <source>Information Sciences</source>
          ,
          <volume>295</volume>
          :
          <fpage>633</fpage>
          -
          <lpage>649</lpage>
          ,
          <year>2015</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>P.</given-names>
            <surname>Becker</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.H.</given-names>
            <surname>Correia</surname>
          </string-name>
          .
          <source>The ToscanaJ Suite for Implementing Conceptual Information Systems</source>
          , volume
          <volume>3626</volume>
          <source>of LNCS</source>
          , pages
          <fpage>324</fpage>
          -
          <lpage>348</lpage>
          . Springer,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>R.</given-names>
            <surname>Belohlavek</surname>
          </string-name>
          , B. De Baets,
          <string-name>
            <given-names>J.</given-names>
            <surname>Outrata</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Vychodil</surname>
          </string-name>
          .
          <article-title>Inducing decision trees via concept lattices</article-title>
          .
          <source>International journal of general systems</source>
          ,
          <volume>38</volume>
          (
          <issue>4</issue>
          ):
          <fpage>455</fpage>
          -
          <lpage>467</lpage>
          ,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>P.V.</given-names>
            <surname>Borza</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Sabou</surname>
          </string-name>
          , and
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Sa˘ca˘rea. Openfca, an open source formal concept analysis toolbox</article-title>
          .
          <source>In Automation Quality and Testing Robotics (AQTR)</source>
          , volume
          <volume>3</volume>
          , pages
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          . IEEE,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>A.</given-names>
            <surname>Frank</surname>
          </string-name>
          and
          <string-name>
            <surname>A. Asuncion.</surname>
          </string-name>
          <article-title>UCI machine learning repository</article-title>
          : http://archive.ics.uci.edu/ml,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>P.</given-names>
            <surname>Krajca</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Outrata</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Vychodil</surname>
          </string-name>
          .
          <article-title>Parallel recursive algorithm for FCA</article-title>
          . In R. Belohavlek and
          <string-name>
            <surname>S.O</surname>
          </string-name>
          . Kuznetsov, editors,
          <source>Proceedings of Concept Lattices and their Applications</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>O.</given-names>
            <surname>Kuznetsov</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          <article-title>A fast algorithm for computing all intersections of objects in a finite semi-lattice</article-title>
          .
          <source>Automatic Documentation and Mathematical Linguistics</source>
          ,
          <volume>27</volume>
          (
          <issue>5</issue>
          ):
          <fpage>11</fpage>
          -
          <lpage>21</lpage>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>C. Melo</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          <string-name>
            <surname>Le-Grand</surname>
          </string-name>
          ,
          <article-title>M-A. Aufaure, and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Bezerianos</surname>
          </string-name>
          .
          <article-title>Extracting and visualising tree-like structures from concept lattices</article-title>
          .
          <source>In Proceedings of the15th International Conference on Information Visualisation</source>
          , pages
          <fpage>261</fpage>
          -
          <lpage>266</lpage>
          . IEEE,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. U. Priss.
          <article-title>Fcastone-fca file format conversion and interoperability software</article-title>
          .
          <source>Conceptual Structures Tools and the Web, page 33</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12. G. Stumme,
          <string-name>
            <given-names>R.</given-names>
            <surname>Taouil</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bastide</surname>
          </string-name>
          , and
          <string-name>
            <given-names>L.</given-names>
            <surname>Lakhal</surname>
          </string-name>
          .
          <article-title>Conceptual clustering with iceberg concept lattices</article-title>
          .
          <source>Proc. GI-Fachgruppentreffen Maschinelles Lernen (FGML01)</source>
          ,
          <year>2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>P.</given-names>
            <surname>Valtchev</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Grosser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Roume</surname>
          </string-name>
          , and
          <string-name>
            <given-names>M. R.</given-names>
            <surname>Hacene</surname>
          </string-name>
          .
          <article-title>Galicia: an open platform for lattices</article-title>
          . In A. de Moor B. Ganter, editor,
          <source>Using Conceptual Structures: Contributions to 11th Intl. Conference on Conceptual Structures</source>
          , pages
          <fpage>241</fpage>
          -
          <lpage>254</lpage>
          ,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>P.</given-names>
            <surname>Velardi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Navigli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Cuchiarelli</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Neri</surname>
          </string-name>
          .
          <article-title>Evaluation of ontolearn, a methodology for automatic learning of domain ontologies</article-title>
          .
          <source>Ontology Learning from Text: Methods, evaluation and applications</source>
          ,
          <volume>123</volume>
          :
          <fpage>92</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <given-names>S. A.</given-names>
            <surname>Yevtushenko</surname>
          </string-name>
          .
          <article-title>System of data analysis ”concept explorer”. (in russian)</article-title>
          .
          <source>In Proceedings of the 7th national conference on Artificial Intelligence KII-2000</source>
          , pages
          <fpage>127</fpage>
          -
          <lpage>134</lpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>