• Keine Ergebnisse gefunden

INPUT: closure operator·′′ on finite linearly ordered setM and subsetBM OUTPUT: lectically next closed set afterB, if it exists,⊥, else

0 forall mM in reverse orderdo

1 if mB then

2 BB\ {m}

3 else

4 D≔(B∪ {m})′′

5 if D\B contains no element <m then

6 return D

7 return ⊥

There are several other algorithms for computing closed sets having differ-ent properties, advantages and disadvantages. For example there are Close-by-Onelike algorithms [66],Godin[48],Nourine[84], andTitanic[117]. An interesting, but not recent, comparison can be found in [69]. However, in the next section we introduce notion of implications in formal contexts for which most of the other algorithms are ineffective, in contrast toNext-Closure.

3.4 Implications

As mentioned in Chapter 1 and the beginning of this chapter, for the most part of this thesis we consider knowledge discovery in bipartite graphs as finding implications in the corresponding formal context. More formally, our goal is discovering the attribute logic, or object logic, of data structures which are representable as formal contexts. Chapters 8 and 9, where we mainly investigate the lattice structure reflecting an other aspect of knowledge, are an exception to this.

Definition 3.20 (Valid (attribute) Implications in Formal Contexts) LetK= (G, M, I) be a formal concept. Anattribute implication inM is a pair of subsets ofM, i.e.,f := (X, Y)∈ P(M)× P(M), denoted byXY.

The setXis called thepremiseoff,Y is called theconclusionoff, and the set of all implications inM is denoted by Imp(M).

An implicationf ∈Imp(M) isvalid(holds) inK, denoted byK|=f if and only ifAB. ForL ⊆Imp(M) we writeK|=Liff∀f ∈ L: K|=f.

We call the set of all valid attribute implications inK(attribute) implicational theoryofK, denoted by Th(K).

Due to the duality of formal contexts, as mentioned in Section 3.1, all notions about the attribute set can be translated to the object set as well.

There are various characterizations for the validity of implications. For example, the validity of an implicationXY inKcan be characterized by

gG: Xg =⇒ Yg. We will use in the following chapters some of those as definitions for practical purposes. For example in Section 5.3.1 we may rather speak about setsclosed under implicationto express the validity of some implication. Furthermore, in Chapter 10 we use a pure attribute closure system view on implications to simplify the notation for the local goal in this chapter. Therefore, we may recall or state this or another definition in the following work. However, whenever implications are used in the following chapters their definitions are consistent with Definition 3.20.

Example 3.21 (Valid Implications inKTNG)

Some implications valid inKTNGfrom Example 3.2 would be:

• {android} → {Starfleet}

• {in-Nexus, Starfleet} → {human}

However, for example, the implication{Starfleet} → {android}would not be valid, since the “object” Picard is a counterexample.

In Chapter 5 we rely on multiple notions building up from the just made definition for valid implications. One obstacle when working with the theory of a formal context is its size. Some implications in such a theory may imply another from that same theory. By formalizing this notion of an implication following a set of implications we can find subsets of theories from which all other valid implications follow. To do this we need to introduce the idea of a (logical) model.

3.4. IMPLICATIONS 35 Definition 3.22 (Models)

LetK= (G, M, I) be a formal context. A subsetBMrespectsan implication XY withX, YM if

XB or YB

We then sayBis amodelof the implicationXY, denoted by B|=XY. ForLa set of implications we sayBis a model forL, denoted byB|=LifBis a model for every implication inL. We denote by

ModL≔{BM|B|=L}

the set of all models forL

The set ModLgives raise to an interesting closure system.

Proposition 3.23 (Closure System of Models, cf. [42, Prop 14])

LetK= (G, M, I) be a formal context andLa set of implications inM. Then

• ModLis a closure system onM,

• the mapX↦→ L(X) with L(X) =⋂︂

{Y |XYM, Y ∈ModL}

is a closure operator, and

• ifLis the set of all valid implications inKthen ModLis the system of all concept intents, i.e., ModL=M(K).

We can now formalize the notion of implications following semantically.

Definition 3.24 (Implicational Theory)

LetK= (G, M, I) be a formal context andLbe a set of implications inM. An implicationXY inMfollows(semantically) fromL, denoted byL |=XY, if allBM withB∈ModLare a model forXY.

A set of implicationsLis atheory(or,closed) if every implicationXY that follows fromLis contained inL.

Now the goal is to find a proper subset of the theory of a formal context which is correct and complete.

Definition 3.25 (Basis)

LetK= (G, M, I) be a formal context. A set of implicationsL ⊆Imp(M) is called

completewith respect toKiffevery implication that holds inKfollows fromL,

soundwith respect toKiffeach implication inLhold inK,

nonredundantiffno implication inLfollows from a subset inL.

We call Lbasiswith respect to the theory ofKiffLis sound and complete (with respect toK).

Of course the properties defined in Definition 3.25 can be used in general with respect to any other set of implicationsJ ⊆Imp(M). The properties then are not with respect to some formal context but toJ.

There are various bases used in FCA. One of them stands out due to its minimal size. It is based on the notion of pseudo-intent, an interesting but slightly misleading neologism by one of the authors of [43].

Definition 3.26 (Pseudo-intent [42, Definiton 12])

LetK= (G, M, I) be a formal context. A setPM is apseudo-intent ofKiff

P ∉M(K), i.e.,P is not a concept intent inK, and

• ifQP is a pseudo-intent, thenQ′′P.

So in fact, a pseudo-intent is never a concept intent and both are subsets ofM. Hence, a formal context exhibiting many concept intents cannot haven many pseudo-intents. In particular, the formal context of the contranominal scale, as introduced in Section 3.1.2, has no pseudo-intents due to the fact that every subset ofM is a concept intent.

Theorem 3.27 (Canonical Basis (Guigues and Duquenne) [42, Theorem 7]) LetK= (G, M, I) be a formal context withM finite and letX ↦→X′′ be the closure operator according toK. The set of implications, calledcanonical basis ofK,

Can(K)≔{PP′′|P is pseudo-intent} is sound, complete (with respect toK), and nonredundant.

3.4. IMPLICATIONS 37 For practical reasons one does often use a slightly different version of this basis to reduce redundancies in the presentation of the implications themselves.

Can(K)≔{PP′′\P |P is pseudo-intent}

The canonical basis has many useful properties, the most import is being a basis of minimal size [50]. For that reason it is often used in computational applications. Still, the size of the canonical basis for a formal context (G, M, I) can still be exponential [67] compared to the size ofM. Also, computing the canonical basis is not easy in general. For example, recognizing pseudo-intents is a co-NP-complete problem [15]. We will cope with this computational infeasibility in Chapters 5 and 6.

3.4.1 Association Rules

Association Rules are closely related to the just introduced implications. They emerged from the analysis of database transactions forstrong rules[95], which are essentially implications in the sense of Definition 3.20. Based on this the authors of [4] introduced the notion ofassociation rulesto perform market basket analysis. Those rules are not necessarily valid implication in the domain but the number of counterexamples disproving an implication is low compared to the number of all transactions (objects).

We restrict in the following definition of association rules the transaction to non-repeating lists, i.e., we can consider them as sets of transaction (objects).

Definition 3.28 (Association Rule)

LetT ={t1, . . . , tm}be a finite set oftransactionswith transactionstiJwhere J ={j1, . . . , jn} is called itemset. An assocation rule on J then is an element (X, Y)∈ P(J)× P(J), denoted byXY, such thatXY =∅and

tT :XtYt.

We denote byRtheset of all association rulesforT, and byXT some subset ST such that∀tS:Xt.

This definition is close to the characterization of implications by objects. The main difference is that the premiseXis always excluded in the conclusionY, which does not embody any semantics but a shorter representation.

To make assessments about the importance of association rules as well as about their correctness, in the case they are not valid, we now introduce the two most important measures for association rule discovery.

Definition 3.29 (Support and Confidence)

Given a set of TransactionT over an itemsetJand an association ruleXY. Thesupport ofXY is defined by

supp(X→Y)≔

{tT |XYt}

|T| (3.7)

and theconfidence ofXY is defined by

conf(X→Y)≔supp(X→Y)

supp(X→X) (3.8)

In practice one is interested to compute the set of association rules with respect to some beforehand fixed minimal value for support (minsupp) and confidence (minconf). There are several association rule mining approaches and related algorithms withapriori[5] being the best known. Although we use association rules in Section 7.8.1 it is not necessary to recall how they can be computed because we use them as-is. All that is necessary to know is the deterministic character of the set of association rules for a given set of transactions and parameters minsupp and minconf.

Example 3.30 (Association Rule inKTNG)

Let us informal consider the objects fromKTNG like a set of transactionT over the attribute set M. The association rule f ≔ {Starfleet} → {human} is obviously not valid in T. However, conf(f) = 1/2 since there are two transactions (object closures) entailing the premise, but only one entails the conclusion.

The notion of support and confidence of implications are not exclusive to the realm of association rules. There are various works in formal concept analysis, in particular [22], about learning implications with high confidence.

This ends the recollection of association rules and we come back to a well known procedure to compute the canonical basis of an implicit given domain in the next section.