Computing with Formal Concepts Bernhard Ganter Institut f ur - - PowerPoint PPT Presentation

computing with formal concepts
SMART_READER_LITE
LIVE PREVIEW

Computing with Formal Concepts Bernhard Ganter Institut f ur - - PowerPoint PPT Presentation

Outline Concept lattices Attribute logic Many valued contexts Conclusion Computing with Formal Concepts Bernhard Ganter Institut f ur Algebra Dresden University of Technology D-01062 Dresden bernhard.ganter@tu-dresden.de EPCL Basic


slide-1
SLIDE 1

Outline Concept lattices Attribute logic Many valued contexts Conclusion

Computing with Formal Concepts

Bernhard Ganter

Institut f¨ ur Algebra Dresden University of Technology D-01062 Dresden bernhard.ganter@tu-dresden.de

EPCL Basic Training Camp November 8, 2011

Bernhard Ganter, Dresden University Concept lattices

slide-2
SLIDE 2

Outline Concept lattices Attribute logic Many valued contexts Conclusion

Outline

1 Concept lattices

Data from a hospital Formal definitions More examples

Bernhard Ganter, Dresden University Concept lattices

slide-3
SLIDE 3

Outline Concept lattices Attribute logic Many valued contexts Conclusion

Outline

1 Concept lattices

Data from a hospital Formal definitions More examples

2 Attribute logic

Checking completeness

Bernhard Ganter, Dresden University Concept lattices

slide-4
SLIDE 4

Outline Concept lattices Attribute logic Many valued contexts Conclusion

Outline

1 Concept lattices

Data from a hospital Formal definitions More examples

2 Attribute logic

Checking completeness

3 Many valued contexts

Scaling Turtoise logic

Bernhard Ganter, Dresden University Concept lattices

slide-5
SLIDE 5

Outline Concept lattices Attribute logic Many valued contexts Conclusion

Outline

1 Concept lattices

Data from a hospital Formal definitions More examples

2 Attribute logic

Checking completeness

3 Many valued contexts

Scaling Turtoise logic

4 Conclusion

Bernhard Ganter, Dresden University Concept lattices

slide-6
SLIDE 6

Outline Concept lattices Attribute logic Many valued contexts Conclusion Data from a hospital

Interview data from a treatment of Anorexia nervosa

  • ver-sensitive

withdrawn self-confident dutiful cordial difficult attentive easily offended calm apprehensive chatty superficial sensitive ambitious Myself × × × × × × × × × × My Ideal × × × × × × × × Father × × × × × × × × × × × × Mother × × × × × × × × × × × Sister × × × × × × × × × × Brother-in-law × × × × × × ×

Bernhard Ganter, Dresden University Concept lattices

slide-7
SLIDE 7

Outline Concept lattices Attribute logic Many valued contexts Conclusion Data from a hospital

A biplot of the interview data

uncomplicated valiant thick-skinned complicated difficult apprehensive

  • ver-sensitive

sympathetic attentive superficial Brother-in-law My Ideal Myself Sister Father Mother

Bernhard Ganter, Dresden University Concept lattices

slide-8
SLIDE 8

Outline Concept lattices Attribute logic Many valued contexts Conclusion Data from a hospital

The concept lattice of the interview data

Brother-in-law My Ideal Mother Sister Father Myself ambitious cordial attentive dutiful super ficial self-confident chatty

  • ver-sensitive

calm sensitive apprehensive difficult withdrawn easily offended

Bernhard Ganter, Dresden University Concept lattices

slide-9
SLIDE 9

Outline Concept lattices Attribute logic Many valued contexts Conclusion Formal definitions

Unfolding data in a concept lattice

The basic procedure of Formal Concept Analysis: Data is represented in a very basic data type, called formal context.

Bernhard Ganter, Dresden University Concept lattices

slide-10
SLIDE 10

Outline Concept lattices Attribute logic Many valued contexts Conclusion Formal definitions

Unfolding data in a concept lattice

The basic procedure of Formal Concept Analysis: Data is represented in a very basic data type, called formal context. Each formal context is transformed into a mathematical structure called concept lattice.

Bernhard Ganter, Dresden University Concept lattices

slide-11
SLIDE 11

Outline Concept lattices Attribute logic Many valued contexts Conclusion Formal definitions

Unfolding data in a concept lattice

The basic procedure of Formal Concept Analysis: Data is represented in a very basic data type, called formal context. Each formal context is transformed into a mathematical structure called concept lattice. The information contained in the formal context is preserved.

Bernhard Ganter, Dresden University Concept lattices

slide-12
SLIDE 12

Outline Concept lattices Attribute logic Many valued contexts Conclusion Formal definitions

Unfolding data in a concept lattice

The basic procedure of Formal Concept Analysis: Data is represented in a very basic data type, called formal context. Each formal context is transformed into a mathematical structure called concept lattice. The information contained in the formal context is preserved. The concept lattice is the basis for further data analysis. It may be represented graphically to support communication, or it may be investigated with with algebraic methods to unravel its structure.

Bernhard Ganter, Dresden University Concept lattices

slide-13
SLIDE 13

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

The divisor lattice of 200

1 2 5 4 10 25 20 50 100 8 40 200

Bernhard Ganter, Dresden University Concept lattices

slide-14
SLIDE 14

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

Recommended serving temperatures of some red wines

19◦C 18◦C 17◦C 16◦C 15◦C

Brunello Barolo Bordeaux Barbera Negroamaro Burgundy Beaujolais Trollinger Bernhard Ganter, Dresden University Concept lattices

slide-15
SLIDE 15

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

Recommended serving temperatures for white wines

6◦C 7◦C 8◦C 9◦C 10◦C 11◦C 12◦C 13◦C 14◦C

Moscato Cava Prosecco Champagne white Burgundy Pinot grigio Sauvignon blanc Vernaccia Riesling Chardonnay white Rhone Gew¨ urz traminer Bernhard Ganter, Dresden University Concept lattices

slide-16
SLIDE 16

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

An example about airlines . . .

Bernhard Ganter, Dresden University Concept lattices

slide-17
SLIDE 17

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

. . . and its concept lattice

Bernhard Ganter, Dresden University Concept lattices

slide-18
SLIDE 18

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

Formal contexts

A formal context (G, M, I) consists of sets G, M and a binary relation I ⊆ G × M. For A ⊆ G and B ⊆ M, define A′ := {m ∈ M | g I m for all g ∈ A} B′ := {g ∈ G | g I m for all m ∈ B}. The mappings X → X ′′ are closure operators.

Bernhard Ganter, Dresden University Concept lattices

slide-19
SLIDE 19

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

Formal concepts

(A, B) is a formal concept of (G, M, I) iff A ⊆ G, B ⊆ M, A′ = B, A = B′. A is the extent and B is the intent of (A, B).

Bernhard Ganter, Dresden University Concept lattices

slide-20
SLIDE 20

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

Concept lattice

Formal concepts can be ordered by (A1, B1) ≤ (A2, B2) : ⇐ ⇒ A1 ⊆ A2. The set B(G, M, I) of all formal concepts of (G, M, I), with this

  • rder, is a complete lattice, called the concept lattice of

(G, M, I).

Bernhard Ganter, Dresden University Concept lattices

slide-21
SLIDE 21

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

A formal context

needs water to live lives in water lives on land needs chlorophyll two seed leaves

  • ne seed leaf

can move around has limbs suckles its offspring Leech × × × Bream × × × × Frog × × × × × Dog × × × × × Spike-weed × × × × Reed × × × × × Bean × × × × Maize × × × ×

Bernhard Ganter, Dresden University Concept lattices

slide-22
SLIDE 22

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

and its concept lattice

suckles its

  • ffspring

has limbs can move around lives

  • n land

two seed leaves needs water to live lives in water needs chlorophyll

  • ne seed leaf

dog frog bream bean leech reed maize spike-weed

Bernhard Ganter, Dresden University Concept lattices

slide-23
SLIDE 23

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

The basic theorem

Bernhard Ganter, Dresden University Concept lattices

slide-24
SLIDE 24

Outline Concept lattices Attribute logic Many valued contexts Conclusion More examples

Applications?

Formal Concept Analysis has recently been applied in Description Logics, for checking completeness of knowledge bases, Linguistics, for the investigation of thesauri and ontologies, Software Engineering, for modelling type hierarchies with role types, Biomathematics, for analysing gene expression data, Machine Learning, for discovering website duplicates, Data Mining, for pattern matching problems, Rough Set Theory, for studying granular data, et cetera . . .

Bernhard Ganter, Dresden University Concept lattices

slide-25
SLIDE 25

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

Particles under a microscope

Bernhard Ganter, Dresden University Concept lattices

slide-26
SLIDE 26

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

Pairs of squares

Bernhard Ganter, Dresden University Concept lattices

slide-27
SLIDE 27

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

But did we consider all possible cases?

How can we decide if our selection of examples is complete?

Bernhard Ganter, Dresden University Concept lattices

slide-28
SLIDE 28

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

But did we consider all possible cases?

How can we decide if our selection of examples is complete? A possible strategy is to prove that every implication that holds for these examples, holds in general. Compute the canonical base of the context of examples, and prove that these implications hold in general,

  • r find counterexamples and extend the example set.

Bernhard Ganter, Dresden University Concept lattices

slide-29
SLIDE 29

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

But did we consider all possible cases?

How can we decide if our selection of examples is complete? A possible strategy is to prove that every implication that holds for these examples, holds in general. Compute the canonical base of the context of examples, and prove that these implications hold in general,

  • r find counterexamples and extend the example set.

This can nicely be organised in an algorithm, called attribute exploration.

Bernhard Ganter, Dresden University Concept lattices

slide-30
SLIDE 30

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

Canonical base of the example set

common edge → parallel, common vertex, common segment common segment → parallel parallel, common vertex, common segment → common edge

  • verlap, common vertex → parallel, common segment,

common edge

  • verlap, parallel, common segment → common edge, common

vertex

  • verlap, parallel, common vertex → common segment,

common edge disjoint, common vertex → ⊥ disjoint, parallel, common segment → ⊥ disjoint, overlap → ⊥

Bernhard Ganter, Dresden University Concept lattices

slide-31
SLIDE 31

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

Two of the implications do not hold in general

common edge → parallel, common vertex, common segment common segment → parallel parallel, common vertex, common segment → common edge

  • verlap, common vertex → parallel, common segment,

common edge

  • verlap, parallel, common segment → common edge, common

vertex

  • verlap, parallel, common vertex → common segment,

common edge disjoint, common vertex → ⊥ disjoint, parallel, common segment → ⊥ disjoint, overlap → ⊥

Bernhard Ganter, Dresden University Concept lattices

slide-32
SLIDE 32

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

Conterexamples for the two implications

  • verlap, common vertex → parallel, common segment,

common edge Counterexample:

Bernhard Ganter, Dresden University Concept lattices

slide-33
SLIDE 33

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

Conterexamples for the two implications

  • verlap, common vertex → parallel, common segment,

common edge Counterexample:

  • verlap, parallel, common segment → common edge, common

vertex Counterexample:

Bernhard Ganter, Dresden University Concept lattices

slide-34
SLIDE 34

Outline Concept lattices Attribute logic Many valued contexts Conclusion Checking completeness

A better choice of examples

Bernhard Ganter, Dresden University Concept lattices

slide-35
SLIDE 35

Outline Concept lattices Attribute logic Many valued contexts Conclusion Scaling

Formal contexts that frequently occur

There are many series of formal contexts that have an suggestive

  • interpretation. Such formal contexts will be called scales.

So formally, a scale is the same as a formal context. But it is meant to have a special interpretation. Examples of scales are nominal, ordinal, multiordinal, contranominal, and dichotomic scales.

Bernhard Ganter, Dresden University Concept lattices

slide-36
SLIDE 36

Outline Concept lattices Attribute logic Many valued contexts Conclusion Scaling

Conceptual Scaling

The basic data type of Formal Concept Analysis is that of a formal context. But data is often given in form of a many-valued context. Many–valued contexts are translated to one-valued context via conceptual scaling. This is not automatic; it is an act of interpretation.

Bernhard Ganter, Dresden University Concept lattices

slide-37
SLIDE 37

Outline Concept lattices Attribute logic Many valued contexts Conclusion Scaling

Concept lattice fragment for the lexical field “waters”

natural inland flowing temporary stagnant constant artificial maritime

plash, puddle channel trickle, rill, beck, river, rivulet, runnel, brook, burn, stream, torrent canal tarn, lake, pool mere, pond, revervoir lagoon, sea

Bernhard Ganter, Dresden University Concept lattices

slide-38
SLIDE 38

Outline Concept lattices Attribute logic Many valued contexts Conclusion Scaling

Choosing a scale for a many-valued attribute

Here is a tiny many-valued context with only one many-valued attribute. Size trickle very small brook small river large sea very large How can this be transformed into a one-valued context?

Bernhard Ganter, Dresden University Concept lattices

slide-39
SLIDE 39

Outline Concept lattices Attribute logic Many valued contexts Conclusion Scaling

A naive scaling (“nominal”)

Size trickle very small brook small river large sea very large

trickle brook river sea very small small large very large

Size: very small small large very large trickle × brook × river × sea ×

Bernhard Ganter, Dresden University Concept lattices

slide-40
SLIDE 40

Outline Concept lattices Attribute logic Many valued contexts Conclusion Scaling

A more intuitive scaling (“biordinal”)

Size trickle very small brook small river large sea very large

trickle brook river sea very small small large very large

Size: very small small large very large trickle × × brook × river × sea × ×

Bernhard Ganter, Dresden University Concept lattices

slide-41
SLIDE 41

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

Giant tortoises on the Galapagos

Bernhard Ganter, Dresden University Concept lattices

slide-42
SLIDE 42

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

Data on the Galapagos tortoises

Galapagos Island size Opuntion Turtle type island bushy treelike dome intermediate saddle Albemarle 4278 km2 +

  • +
  • Indefatigable

1025 km2 +

  • +
  • Narborough

650 km2 +

  • +
  • James

574 km2 +

  • +
  • Chatham
  • ca. 500 km2

+

  • +
  • Charles
  • ca. 200 km2

+

  • +

+ Hood <100 km2 +

  • +

Bindloe <100 km2

  • +
  • Abingdon

<100 km2 +

  • +

Barringdon <100 km2 +

  • +

+ Tower <100 km2

  • +
  • Wenman

<100 km2

  • +
  • Culpepper

<100 km2

  • +
  • Jervis

<100 km2 +

  • +

+ Joachim Jaenicke (Ed.). Materialienhandbuch Kursunterricht Biologie, Band 6:

  • Evolution. Aulis Verlag K¨
  • ln 1997, ISBN 3-7614-1966-X.

Bernhard Ganter, Dresden University Concept lattices

slide-43
SLIDE 43

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

Scales for Island Size and for Opuntia

Island size small not large not small large < 100 km2 × × 100–1000 km2 × × > 1000 km2 × × Opuntia bushy | treelike bushy treelike + − × − + ×

Bernhard Ganter, Dresden University Concept lattices

slide-44
SLIDE 44

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

Scales for Island Size and for Opuntia

Island size small not large not small large < 100 km2 × × 100–1000 km2 × × > 1000 km2 × × Opuntia bushy | treelike bushy treelike + − × − + ×

Each many-valued attribute is replaced by the scale attributes. Each value is replaced by the corresponding row of the scale.

Bernhard Ganter, Dresden University Concept lattices

slide-45
SLIDE 45

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

The derived context

island size: large island size: not small island size: not large island size: small

  • puntion: bushy
  • puntion: treelike

turtles: dome turtles: intermediate or saddle turtles: saddle turtles: intermediate Albemarle × × × × Indefatigable × × × × Narborough × × × × James × × × × × Chatham × × × × × Charles × × × × × × Hood × × × × × Bindloe × × × Abingdon × × × × × Barringdon × × × × × × Tower × × × Wenman × × × Culpepper × × × Jervis × × × × × × Bernhard Ganter, Dresden University Concept lattices

slide-46
SLIDE 46

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

Tortoises concept lattice

Abingdon Hood Barringdon Jervis Bindloe, Culpepper Tower, Wenman Narborough Chatham James Charles Albemarle Indefatigable island size: not large island size:small

  • puntion:bushy

turtles: intermediate

  • r saddle

turtles: saddle turtles: intermediate

  • puntion:

treelike island size: not small turtles: dome island size: large Bernhard Ganter, Dresden University Concept lattices

slide-47
SLIDE 47

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

The stem base of the Galapagos data

size: large ⇒ size: not small opuntion: treelike tortoises type: dome; size: not small ⇒ opuntion: treelike; size: small ⇒ size: not large; size: not large size: small opuntion: treelike ⇒ tortoises type: intermediate or saddle tortoises type: saddle;

  • puntion: bushy ⇒ size: not large size: small;

tortoises type: dome ⇒ size: not small opuntion: treelike; tortoises type: intermediate or saddle ⇒ size: not large opuntion: treelike; tortoises type: saddle ⇒ size: not large opuntion: treelike tortoises type: intermediate or saddle; tortoises type: intermediate ⇒ size: not large opuntion: treelike tortoises type: intermediate or saddle; size: large size: not small size: not large opuntion: treelike tortoises type: dome ⇒ size: small opuntion: bushy tortoises type: intermediate or saddle tortoises type: saddle tortoises type: intermediate; . . .

Bernhard Ganter, Dresden University Concept lattices

slide-48
SLIDE 48

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

The stem base must be modified

In the case of scaled many-valued data, the stem base contains useless information. It is induced by the scaling. It is therefore necessary to “subtract” the scaling-induced logic from the stem base and give a base for the remaining information.

Bernhard Ganter, Dresden University Concept lattices

slide-49
SLIDE 49

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

The scaling–induced logic

Island size: small, not small ⊸ ∅ ∅ ⊸ small, not small large, not large ⊸ ∅ ∅ ⊸ large, not large small ⊸ not large Opuntia: bushy, treelike ⊸ ∅ ∅ ⊸ bushy, treelike Turtoises: dome, intermediate or saddle ⊸ ∅ intermediate or saddle ⊸ intermediate, saddle saddle ⊸ intermediate or saddle intermediate ⊸ intermediate or saddle

Bernhard Ganter, Dresden University Concept lattices

slide-50
SLIDE 50

Outline Concept lattices Attribute logic Many valued contexts Conclusion Turtoise logic

The remaining implicational logic

island size: large → turtoises: dome island size: not small →

  • puntia: bushy

turtoises: dome → island size: not small island size: not large, turtoises: intermediate or saddle

  • puntia: bushy

island size: small,

  • puntia: bushy

turtoises: saddle island size: not small, not large, turtoises: intermediate or saddle

turtoises: intermediate.

Bernhard Ganter, Dresden University Concept lattices

slide-51
SLIDE 51

Outline Concept lattices Attribute logic Many valued contexts Conclusion

So what?

The method of Formal Concept Analysis offers an algebraic approach to concept hierarchies.

Bernhard Ganter, Dresden University Concept lattices

slide-52
SLIDE 52

Outline Concept lattices Attribute logic Many valued contexts Conclusion

So what?

The method of Formal Concept Analysis offers an algebraic approach to concept hierarchies. Its strengths are

a solid mathematical and philosophical foundation, ≈ 1000 research publications, experience of several hundred application projects, an expressive and intuitive graphical representation, and a good algorithmic basis.

Bernhard Ganter, Dresden University Concept lattices

slide-53
SLIDE 53

Outline Concept lattices Attribute logic Many valued contexts Conclusion

So what?

The method of Formal Concept Analysis offers an algebraic approach to concept hierarchies. Its strengths are

a solid mathematical and philosophical foundation, ≈ 1000 research publications, experience of several hundred application projects, an expressive and intuitive graphical representation, and a good algorithmic basis.

Due to its elementary yet powerful formal theory, FCA can express other methods, and therefore has a potential to unify methodology.

Bernhard Ganter, Dresden University Concept lattices

slide-54
SLIDE 54

Outline Concept lattices Attribute logic Many valued contexts Conclusion

Any questions?

Bernhard Ganter, Dresden University Concept lattices