=Paper= {{Paper |id=None |storemode=property |title=FCA and pattern structures for mining care trajectories |pdfUrl=https://ceur-ws.org/Vol-1058/paper1.pdf |volume=Vol-1058 |dblpUrl=https://dblp.org/rec/conf/ijcai/BuzmakovEJKNR13 }} ==FCA and pattern structures for mining care trajectories== https://ceur-ws.org/Vol-1058/paper1.pdf
      FCA and pattern structures for mining care
                    trajectories

      Aleksey Buzmakov1,2 , Elias Egho1 , Nicolas Jay1 , Sergei O. Kuznetsov2 ,
                     Amedeo Napoli1 , and Chedy Raı̈ssi1
  1
      LORIA (CNRS – Inria NGE – U. de Lorraine), Vandœuvre-lès-Nancy, France
      2
       National Research University Higher School of Economics, Moscow, Russia
                       {aleksey.buzmakov, chedy.raissi}@inria.fr,
         {elias.egho, nicolas.jay, amedeo.napoli}@loria.fr, skuznetsov@hse.ru

          Abstract. In this paper, we are interested in the analysis of sequential
          data and we propose an original framework based on Formal Concept
          Analysis (FCA). For that, we introduce sequential pattern structures,
          an original specification of pattern structures for dealing with sequential
          data. Pattern structures are used in FCA for dealing with complex data
          such as intervals or graphs. Here they are adapted to sequences. For that,
          we introduce a subsumption operation for sequence comparison, based on
          subsequence matching. Then, a projection, i.e. a kind of data reduction
          of sequential pattern structures, is suggested in order to increase the
          efficiency of the approach. Finally, we discuss an application to a dataset
          including patient trajectories (the motivation of this work), which is a
          sequential dataset and can be processed with the introduced framework.
          This research work provides a new and efficient extension of FCA to
          deal with complex (not binary) data, which can be an alternative to the
          analysis of sequential datasets.
          Keywords: formal concept analysis, pattern structures, sequential pat-
          tern structures, sequences


Introduction
Sequence data is largely present and used in many applications. Consequently,
mining sequential patterns from sequence data has become an important and
crucial data mining task. In the last two decades, the main emphasis has been on
developing efficient mining algorithms and effective pattern representations [1–5].
However, the problem with traditional sequential pattern mining algorithms (and
generally with all pattern enumeration algorithms) is that they generate a large
number of frequent sequences while few of them are truly relevant. Moreover, in
some particular cases, only sequential patterns of a certain type are of interest
and should be mined first. Are we able to develop a framework for taking into
account only patterns of required types? In addition, another drawback for these
pattern enumeration algorithms is that they depend on a user selected support
threshold, which is usually hard to be properly set by non-experts. How can one
avoid the setting of support threshold while having optimal pattern analysis?
   The above questions can be answered by addressing the problem of analyzing
sequential data with the formal concept analysis framework (FCA), an elegant
mathematical approach to data analysis [6], and pattern structures, an extension
of FCA that handles complex data [7]. We explain the usage of projections which
are mathematical functions respecting certain properties and allow to reduce
the computational costs by reducing the volume of resulting patterns. Such a
reduction helps an expert to interpret the extracted sequential patterns and
reduces the famous “pattern flooding”.
    In this paper, we develop a novel and efficient approach for working with
sequential pattern structures in FCA. The rest of the paper is organized as
follows. Section 1 introduces main definitions of FCA and pattern structures.
The next section defines sequential pattern structures. Then, before concluding
the results are presented and discussed in Section 3.


1    FCA and Pattern Structures
FCA [6] is a mathematical formalism having many applications in data analysis.
Pattern structures is a generalization of FCA for dealing with complex struc-
tures, such as sequences or graphs [7]. As it is a generalization it is enough to
introduce only pattern structures.

Definition 1. A pattern structure is a triple (G, (D, u), δ), where G is a set of
objects, (D, u) is a complete meet-semilattice of descriptions and δ : G → D
maps an object to a description.

     The lattice operation in the semilattice (u) corresponds to the similarity
between two descriptions d1 and d2 , i.e. the description which is common between
d1 and d2 . Standard FCA can be presented in terms of pattern structures in the
following way. The set of objects G remains, while the semilattice of descriptions
is (℘(M ), ∩), where ℘(M ) is a powerset of M , and, thus, a description is a set
of attributes, and the similarity operation corresponding to the set intersection,
i.e. the similarity is the set of shared attributes. If x = {a, b, c} and y = {a, c, d}
then x u y = x ∩ y = {a, c}. The mapping δ : G → ℘(M ) is given by, δ(g) =
{m ∈ M | (g, m) ∈ I}, returning the describing set of attributes.
     The Galois connection for a pattern structure (G, (D, u), δ) between the set
of objects and the semilattice of descriptions is defined as follows:
                         l
                 A :=         δ(g),                       for A ⊆ G
                         g∈A

                 d := {g ∈ G | d v δ(g)},                  for d ∈ D

Given a set of objects A, A returns the description which is common to all
objects in A. And given a description d, d is the set of all objects whose de-
scription subsumes d. The partial order on D (v) is defined w.r.t. the similarity
operation u: c v d ⇔ c u d = c, and c is subsumed by d.

Definition 2. A pattern concept of a pattern structure (G, (D, u), δ) is a pair
(A, d) where A ⊆ G and d ∈ D such that A = d and d = A, A is called the
pattern extent and d is called the pattern intent.
    As in the standard case of FCA, a pattern concept corresponds to the max-
imal set of objects A whose description subsumes the description d, while there
is no e ∈ D, subsuming d, i.e. d v e, describing every object in A. The set of all
concepts can be partially ordered w.r.t. partial order on extents (dually, intent
patterns, i.e v), within a concept lattice.
    It is wroth mentioning, that the size of the concept lattice can be exponential
w.r.t. to the number of objects, and, thus, we need a special ranking method to
select the most interesting concepts for further analysis. Several such techniques
are considered in [8], where it is shown that stability index [9] is more reliable
in noisy data. Thus, we decided to use this index in the current work.
    An example of pattern structures is given by Table 1a and described in the
next sections, the corresponding lattice is depicted in Figure 1a.


2     Sequential Pattern Structures

2.1     An Example of Sequential Data
                                                  Subsequences             Subsequences
      Patient Trajectory                      ss1 h{c, d} ; {b} ; {d}i ss5 h{a} ; {d}i
        p1    h{a} ; {c, d} ; {b, a} ; {d}i   ss2 h{d} ; {a}i          ss6   h{a, d}i
        p2    h{c, d} ; {b, d} ; {a, d}i        3
                                              ss h{c, d} ; {b}i        ss7    h{a}i
        p3    h{c, d} ; {b} ; {a} ; {a, d}i   ss4 h{c, d} ; {b} ; {a}i
           (a) Sequential dataset.               (b) Some common subsequences.

         Table 1: A toy sequential dataset of patient medical trajectories.

     A medical trajectory of a patient is a sequence of hospitalizations, where every
hospitalization is described by a set of medical procedures the patient underwent.
An example of medical trajectories for three patients is given in Table 1a. Patient
p1 had four hospitalizations and during the second hospitalization he underwent
procedures c and d. Patients may have a different number of hospitalizations.
Hereafter we use the following notation, different sequences are enumerated in
superscript (p1 ), while elements of a sequence are enumerated in the subscript
(p12 = {c, d}). One important task is to find the characteristic subsequences of
hospitalizations for patients to optimize hospitalization processes. For example,
we can find a strange sequence and, thus, motivate the deeper analysis of the
problems behind or we can find typical sequences that allow us to estimate the
treatment costs for a patient.


2.2     Partial Order on “Complex” Sequences

A sequence is constituted of elements from an alphabet. The classical subse-
quence matching task requires no special properties of the alphabet. Several
generalization of the classical case were made by introducing subsequence re-
lation based on itemset alphabet [10] or on multidimensional and multilevel
alphabet [11]. Here, we generalize the previous cases, requiring for an alphabet
                                            n            o            
                                              p1 , p2 , p3 ; ss3 , ss7                                                                          n                  o 
                                                                                                                                                     p1 , p2 , p3    ;


      n              o                      n       o                  n             o                    n              o                                        n               o           
           p1 , p 2       ; ss1 , ss2           p1 , p3 ; ss3 , ss5             p2 , p3       ; ss4 , ss6            p1 , p2        ; ss1                                      p2 , p 3        ; ss4



             n        o                          n  o                         n        o                   n         o                       n  o                n          o          
                  p1       ; p1                      p2 ; p2                           p3       ; p3                   p1       ; p1                   p2 ; p2                    p3       ; p3




                                                      (∅; ∗)                                                                                            (∅; ∗)



                                      (a) Original Lattice.                                                           (b) Projected Lattice.
Fig. 1: The concept lattices for the pattern structure given by Table 1a. Concept
intents refers to sequences in Tables 1a and 1b.
to form a semilattice (E, uE )1 . This generalization allows one to process in a
unified way all types of complex sequential data.

Definition 3. A sequence t = ht1 ; ...; tk i is a subsequence of a sequence s =
hs1 ; ...; sn i, denoted t ≤ s, iff k ≤ n and there exist j1 , ..jk such that 1 ≤ j1 <
j2 < ... < jk ≤ n and for all i ∈ {1, 2, ..., k}, ti vE sji .

     With complex sequences and such kind of subsequences the calculation pro-
cedures can be difficult, thus, to simplify the procedure, only “restricted” sub-
sequences are considered, where only the order of consequent elements is taken
into account, i.e. given a j1 in Definition 3, ji = ji−1 + 1 for all i ∈ {2, 3, ..., k}.
Such a restriction makes sens for our data, because a hospitalization is a discrete
event and it is likely that the next hospitalization has a relation with the previ-
ous one, for example, hospitalizations for treating aftereffects of chemotherapy.
Below the word “subsequence” refers to a “restricted” subsequence.
     Based on Definition 3 and on the alphabet (℘(P ), ∩), the sequence ss1 in
Table 1b is a subsequence of p1 because if we set ji = i + 1 (Definition 3) then
ss11 v p12 ({c, d} ⊆ {c, d}), ss12 v p13 ({b} ⊆ {b, a}) and ss13 v p14 ({d} ⊆ {d}).


2.3           Meet-semilattice of Sequences

Using the previous definitions, we can precisely define the sequential pattern
structure. For that, we make an analogy with the pattern structures for graphs [12]
where the meet-semilattice operation u respects subgraph isomorphism. Thus,
we introduce a sequential meet-semilattice respecting subsequence relation. Given
an alphabet lattice (E, uE ), D consists of sets of sequences based on E, such
that if d ∈ D contains a sequence s then all subsequences of s should be included
into d, ∀s ∈ d, @s̃ ≤ s : s̃ ∈
                             / d. Similarity operation is the set intersection for two
sets of sequences. Given two patterns d1 , d2 ∈ D, the set intersection operation
ensures that if a sequence s belongs to d1 u d2 then any subsequence of s belongs
to d1 ud2 and thus (d1 ud2 ) ∈ D. As the set intersection operation is idempotent,
commutative and associative, (D, u) is a valid semilattice.
1
    In this paper we consider two semilattices, the first one is on the characters of the
    alphabet, (E, uE ), and the second one is introduced by pattern structures, (D, u).
    However, the set of all possible subsequences can be rather large. Thus, it is
more efficient and representable to keep a pattern d ∈ D as a set of all maximal
sequences d,˜ d˜ = {s ∈ d | @s∗ ∈ d : s∗ ≥ s} . Below, every pattern is given only
                                                                  
by the set of maximalsequences. For example, p2 u p3 = ss4 , ss6 (see
Tables 1a and 1b), i.e. ss4 , ss6 is theset of maximal
                                                      common subsequences be-
tween {p2 } and {p3 }, correspondingly ss4 , ss6 u p1 = ss3 , ss7 . Moreover,
representing a pattern by the set of maximal sequences allows for an efficient
implementation of the intersection “u” (see Section 3.1 for more details).
    The sequential pattern structure
                                        for the example given by Subsection 2.1
is (G, (D, u), δ), where G = p1 , p2 , p3 , (D, u) is the semilattice of sequential
descriptions, and δ is the mapping associating an object in G to a description in
D shown in Table 1a. Figure 1a shows the resulting lattice of sequential pattern
concepts for this particular pattern structure (G, (D, u), δ).


2.4   Projections of Sequential Pattern Structures

Pattern structures can be hard to process due to the usually large number of
concepts in the concept lattice and the complexity of the involved descriptions
and the similarity operation. Moreover, a given pattern structure can produce
a lattice with a lot of patterns which are not interesting for an expert. Can we
save computational time by deleting some unnecessary patterns? Projections of
pattern structures “simplify” to some degree the computation and allow one
to work with a reduced description. In fact, projections can be considered as
constraints (or filters) on patterns respecting certain mathematical properties.
These mathematical properties guarantee that the projection of a lattice is a
lattice where projected concepts have certain correspondence to original ones.
We introduce projections on sequential patterns, adapting them from [7].
    A projection ψ : D → D is an operator, which is monotone (x v y ⇒
ψ(x) v ψ(y)), contractive (ψ(x) v x) and idempotent (ψ(ψ(x)) = ψ(x)). A
projection preserves the semilattice operation u as follows. Under a projection
ψ, the pattern structure (G, (D, u), δ) becomes the projected pattern structure
ψ((G, (D, u), δ)) = (G, (Dψ , uψ ), ψ ◦ δ), where Dψ = ψ(D) = {d ∈ D | ∃d∗ ∈
D : ψ(d∗ ) = d} and ∀x, y ∈ D, x uψ y := ψ(x u y). The concepts of a projected
pattern structure have a “similar” concept in the initial pattern structure [7].
    One possible projection for sequential pattern structures comes from the
following observation. In many cases it can be more interesting to analyze quite
long common subsequences rather than small ones. For example, if we prefer
common subsequences of length > 2, then between p1 and p2 in Table 1a there
is only one maximal common subsequence, ss1 in Table 1b, while ss2 in Table 1b
is too short to be considered as a common subsequence. Such kind of projections
we call Minimal Length Projection (MLP) and depends on the parameter l,
the minimal allowed length of the sequences in a pattern. The projected pattern
concept lattice for MLP ≥ 3 is shown in Figure 1b. In the experimentation section
we compare MLP projections with different value of the parameter. Projections
are very useful, as they reduce the computational costs in a meaningful manner.
3     Sequential Pattern Structure Evaluation

3.1    Implementation

Nearly all state-of-the-art FCA algorithms can be adapted to process pattern
structures. We adapted AddIntent algorithm [13], as the lattice structure is im-
portant for us to calculate stability (see the algorithm for calculating stability
in [14]). To compute the semilattice operation (u, v) between two sets of se-
quences S = {s1 , ...sn } and T = {t1 , ..., tm }, S u T is calculated according to
Section 2.3, i.e. maximal sequences among all maximal common subsequences
for any pair of si and tj . To find all common subsequences of two sequences,
the following observations is useful. If ss = hss1 ; ...; ssl i is a subsequence of
s = hs1 ; ...; sn i with jis = k s +i (Definition 3: k s is the index difference from which
ss is a subsequence of s) and a subsequence of t = ht1 ; ...; tm i with jit = k t + i
(likewise), then for any index i ∈ {1, 2, ..., l}, ssi vE (sjis u tjit ). Thus, to find
maximal common subsequences between s and t, we, first, align s and t in all
possible ways, and then we compute the resulting intersections and keep only
the maximal ones. Let us consider two possible alignments of s1 and s2 :
 s1 = h{a} ; {c, d} ; {b, a}; {d} i                   s1 = h{a} ; {c, d};{b, a}; {d} i
 s2 =               h {c, d};{b, d} ; {a, d}i         s2 =      h {c, d};{b, d};{a, d} i
ssl =               h ∅ ; {d} i                      ssr =      h {c, d}; {b} ; {d} i
The left intersection ssl is smaller than ssr and, thus, is not kept.


3.2    Experiments and Discussion

The experiments are carried out on an “Intel(R) Core(TM) i7-2600 CPU @
3.40GHz” computer with 8Gb of memory under the Ubuntu 12.04 operating
system. The algorithms are not parallelized and are coded in C++.
    First, the public available dataset from UCI repository on anonymous web
data is used as a benchmark data set for scalability tests. This dataset contains
around 106 transactions, and each transaction is a sequence based on “simple”
alphabet, i.e. with no order on the elements. The overall time changes from
37279 seconds for the sequences of length M LP ≥ 5 upto 97042 seconds for the
sequences of length M LP ≥ 3. For more details see the web-page.2
    Our use-case data set comes from a French healthcare system [15]. In the
experiment, 1000 patients are analyzed. The dataset describes a patient as a
sequence of hospitalizations without any timestamps. A hospitalization for a
patient is a tuple with the hospital name, the cause for the hospitalization and
the set of procedures the patient underwent. All the field of a hospitalization are
joined into one single set, which describes one element of a sequence.
    Table 2 shows the final times and the lattice sizes for different projections.
The calculation time with projections changes from 3120 to 4510 seconds depend-
ing on the projection parameter. The lattice sizes for the different projections
2
    http://www.loria.fr/~abuzmako/FCA4AI2013/experiment-uci.html
             Projection   No       l=2 l=3 l=4 l=5 l=6
              Time(s) > 1.4 ∗ 105 4510 3878 3722 3435 3120
              Lattice > 2.8 ∗ 106 554332 271166 189353 137912 100492
    Table 2: The processing time and the lattice size for the PMT dataset.
                                      Intent                              Extent
         c1                   h{DChemotherapy } ∗ 8i                     284 (28%)
         c2 h{DDevice Adj. , PArtery Catheter } ; {DChemotherapy } ∗ 12i 74 (7%)
         c3                 h{PChest Radiography } ∗ 2i                  189 (19%)
            Table 3: Some interesting concepts of the PMT database

changes from 105 to 5 · 105 . Notice that the ratio for the lattice size is of 5 while
the ratio for computation time is 1.5. Deletion of short sequences can dramati-
cally change the lattice size, since the shorter a sequence is, the more probable it
is a subsequence of a patient trajectory, but the computation of the semilattice
operation is easily processed with shorter sequences. The calculation without
projection takes a lot of time with relatively small lattice size (40 times more for
the runtime and 6 times more for the lattice size w.r.t the projection l = 2). The
reason for that is memory swapping to the hard disk. Thus, the best projection
for that dataset is l = 2 as its computation time is reasonable and it preserves
the most of the information among the other projections.
    Table 3 shows some interesting concept intents and the sizes of the corre-
sponding extents. The concept are selected among the most stable ones [9]. The
concept c1 corresponds to 28% of the patients having at least 8 consequent hos-
pitalizations because of chemotherapy. Now we can estimate the minimal cost of
the overall procedures for a patient (we know the price of chemotherapy and we
know the expected number of procedures). Concept c2 covers 7% of the patients,
and its intent is more interesting: 12 hospitalizations for chemotherapy follow-
ing the hospitalization for adjustment of a chemotherapy device and an artery
catheter installation. Both concepts c1 and c2 can be found within any of the
considered projections (with l ∈ {2, 3, .., 6}), while the concept c3 can be found
only within the most specific projection (l = 2). The concept c3 covers 19% of
the patients and describes patients with at least two consequent hospitalizations
accompanied with a chest radiography. In this way, we have a kind of control of
the trajectory quality, because we could have an under-examination of a patient
during the first hospitalization.

Conclusion
In this paper, we present an approach for analyzing sequential datasets within
the framework of pattern structures, an extension of FCA dealing with complex
(non binary) data. Using pattern structures leads to the construction of a pattern
concept lattice, which does not require the setting of a support threshold, as
usually needed in sequential pattern mining. Another point worth to be noticed
is that the use of projections gives a lot of flexibility especially for mining and
interpreting special kinds of patterns. The framework is tested on a real-life
dataset recording patient trajectories in a healthcare system. Interesting patterns
are extracted and then interpreted, showing the feasibility and usefulness of
the approach. For the future work, it is important to more deeply investigate
projections, their potentialities w.r.t. the types of patterns.
Acknowledgements: this research received funding from the Basic Research
Program at the National Research University Higher School of Economics (Rus-
sia) and from the BioIntelligence project (France).

References
 1. Han, J., Pei, J., Mortazavi-Asl, B., Chen, Q., Dayal, U., Hsu, M.: FreeSpan:
    frequent pattern-projected sequential pattern mining. In: Proceedings of the sixth
    ACM SIGKDD international conference on Knowledge discovery and data mining.
    (2000) 355–359
 2. Pei, J., Han, J., Mortazavi-Asl, B., Pinto, H., Chen, Q., Dayal, U., Hsu, M.C.:
    PrefixSpan Mining Sequential Patterns Efficiently by Prefix Projected Pattern
    Growth. In: 17th International Conference on Data Engineering. (2001) 215–226
 3. Yan, X., Han, J., Afshar, R.: CloSpan: Mining Closed Sequential Patterns in Large
    Databases. In: In SDM. (2003) 166–177
 4. Ding, B., Lo, D., Han, J., Khoo, S.C.: Efficient Mining of Closed Repetitive Gapped
    Subsequences from a Sequence Database. In: 2009 IEEE 25th International Con-
    ference on Data Engineering, IEEE (March 2009) 1024–1035
 5. Raı̈ssi, C., Calders, T., Poncelet, P.: Mining conjunctive sequential patterns. Data
    Min. Knowl. Discov. 17(1) (2008) 77–93
 6. Ganter, B., Wille, R.: Formal Concept Analysis: Mathematical Foundations. 1st
    edn. Springer, Secaucus, NJ, USA (1997)
 7. Ganter, B., Kuznetsov, S.O.: Pattern Structures and Their Projections. In Delu-
    gach, H., Stumme, G., eds.: Conceptual Structures: Broadening the Base SE - 10.
    Volume 2120 of LNCS. Springer Berlin Heidelberg (2001) 129–142
 8. Klimushkin, M., Obiedkov, S.A., Roth, C.: Approaches to the Selection of Relevant
    Concepts in the Case of Noisy Data. In: Proceedings of the 8th international
    conference on Formal Concept Analysis. ICFCA’10, Springer (2010) 255–266
 9. Kuznetsov, S.O.: On stability of a formal concept. Annals of Mathematics and
    Artificial Intelligence 49(1-4) (2007) 101–115
10. Casas-Garriga, G.: Summarizing Sequential Data with Closed Partial Orders. In:
    SDM. (2005)
11. Plantevit, M., Laurent, A., Laurent, D., Teisseire, M., Choong, Y.W.: Mining mul-
    tidimensional and multilevel sequential patterns. ACM Transactions on Knowledge
    Discovery from Data 4(1) (January 2010) 1–37
12. Kuznetsov, S.: Learning of Simple Conceptual Graphs from Positive and Negative
    Examples. Volume 1704 of LNCS. Springer (1999) 384–391
13. Merwe, D.V.D., Obiedkov, S., Kourie, D.: AddIntent: A new incremental algorithm
    for constructing concept lattices. In Goos, G., Hartmanis, J., Leeuwen, J., Eklund,
    P., eds.: Concept Lattices. Volume 2961. Springer (2004) 372–385
14. Roth, C., Obiedkov, S., Kourie, D.G.: On succinct representation of knowledge
    community taxonomies with formal concept analysis A Formal Concept Analy-
    sis Approach in Applied Epistemology. International Journal of Foundations of
    Computer Science 19(02) (April 2008) 383–404
15. Fetter, R.B., Shin, Y., Freeman, J.L., Averill, R.F., Thompson, J.D.: Case mix
    definition by diagnosis-related groups. Med Care 18(2) (February 1980) 1–53