knowledge discovery with fca

74
1/67 Knowledge Discovery with FCA Lecture 1: Introduction to Formal Concept Analysis Babes ¸-Bolyai University, Computer Science Department, Cluj-Napoca [email protected] February 27, 2018

Upload: others

Post on 08-Jan-2022

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Knowledge Discovery with FCA

1/67

Knowledge Discovery with FCA

Lecture 1: Introduction to Formal Concept Analysis

Babes-Bolyai University, Computer Science Department, [email protected]

February 27, 2018

Page 2: Knowledge Discovery with FCA

2/67

WHAT IS FORMAL CONCEPT ANALYSIS?BRANCH OF APPLIED MATHEMATICS AND ARTIFICIAL INTELLIGENCE

� Based on Lattice Theory developed by Garrett Birkhoffand others in the 1930s

� Employs algebra in order to formalize notions of conceptand conceptual hierarchy

� Term Formal Concept Analysis (short: FCA) introduced byRudolf Wille in the 1980s.

Page 3: Knowledge Discovery with FCA

3/67

WHY FORMAL CONCEPT ANALYSIS

Because...The methods of Formal Concept Analysis offers an algebraicapproach to data analysis and knowledge processing.

� Strengths of FCA are� a solid mathematical and philosophical foundation,� more than 2000 research publications,� experience of several hundred application projects,� an expressive and intuitive graphical representation,� Due to its elementary yet powerful formal theory, FCA can

express other methods, and therefore has the potential tounify the methodology of data analysis.

Page 4: Knowledge Discovery with FCA

4/67

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, item

Machine Learning, for discovering website duplicates,� Data Mining, for pattern matching problems,� Rough Set Theory, for studying granular data,� Web Usage Mining, for discovering usage patterns� Medicine, etc...

Page 5: Knowledge Discovery with FCA

5/67

WHAT IS FORMAL CONCEPT ANALYSIS?FORMAL CONCEPT ANALYSIS (FCA) IS A

� mathematization/formalization of the philosophicalunderstanding of concepts

� human-centered method to structure and analyze data� method to visualize data and its inherent structures,

implications and dependencies

Page 6: Knowledge Discovery with FCA

6/67

AGENDA

1 Concept Lattices� What is a concept?� Formal Context� Derivation Operators� Formal Concept� Concept Lattice� Computing All Concepts� Drawing Concept Lattices� Clarifying and Reducing a Formal Context� Interlude: ConExp, FCA Tools Bundle

Page 7: Knowledge Discovery with FCA

7/67

WHAT IS A CONCEPT?

Page 8: Knowledge Discovery with FCA

8/67

WHAT IS A CONCEPT?

Consider the concept bird. What drives us to call something abird?� Every object with certain attributes is called bird:

� A bird has feathers.� A bird has two legs.� A bird has a bill.

� All objects having these attributes are called birds:� Duck, goose, owl and parrot are birds.� Penguins are birds, too.� . . .

Page 9: Knowledge Discovery with FCA

9/67

WHAT IS A CONCEPT?

We need� objects� attributes� . . .

� what else?� What makes a concept to be a concept?

Page 10: Knowledge Discovery with FCA

9/67

WHAT IS A CONCEPT?

We need� objects� attributes� . . .

� what else?� What makes a concept to be a concept?

Page 11: Knowledge Discovery with FCA

10/67

WHAT IS A CONCEPT IN FCA?

Formal Concept Analysis models concepts as units of thoughtthat consist of two parts:� The concept extent comprises all objects that belong to the

concept.� The concept inten contains all attributes that all of the

objects have in common.

FCA is used, amongst others, in data analysis, informationretrieval, data mining and software engineering.

Page 12: Knowledge Discovery with FCA

11/67

WHAT IS A CONCEPT?FCA is working on the conceptual layer. The representationallayer plays only a minor role.

Page 13: Knowledge Discovery with FCA

12/67

WHAT IS A (FORMAL) CONCEPT?

Page 14: Knowledge Discovery with FCA

13/67

THE UNIVERSE OF DISCOURSE

Page 15: Knowledge Discovery with FCA

13/67

THE UNIVERSE OF DISCOURSE

Page 16: Knowledge Discovery with FCA

14/67

THE (FORMAL) CONTEXT

Page 17: Knowledge Discovery with FCA

14/67

THE (FORMAL) CONTEXT

Page 18: Knowledge Discovery with FCA

15/67

THE (FORMAL) CONTEXT

DefinitionA formal context is a triple (G,M, I), where G is a set of objects, M isa set of attributes, and I is a relation between G and M.

� What is a relation?� What types of relations do we know?

We read (g,m) ∈ I as object g has attribute m.

Page 19: Knowledge Discovery with FCA

15/67

THE (FORMAL) CONTEXT

DefinitionA formal context is a triple (G,M, I), where G is a set of objects, M isa set of attributes, and I is a relation between G and M.

� What is a relation?� What types of relations do we know?

We read (g,m) ∈ I as object g has attribute m.

Page 20: Knowledge Discovery with FCA

15/67

THE (FORMAL) CONTEXT

DefinitionA formal context is a triple (G,M, I), where G is a set of objects, M isa set of attributes, and I is a relation between G and M.

� What is a relation?� What types of relations do we know?

We read (g,m) ∈ I as object g has attribute m.

Page 21: Knowledge Discovery with FCA

16/67

EXAMPLE 1

Page 22: Knowledge Discovery with FCA

17/67

EXAMPLE 2

Page 23: Knowledge Discovery with FCA

18/67

DATA REPRESENTATION

� By a formal context we represent data...� Nice... but...� However, why FCA and not SQL, Data Mining, etc?

Page 24: Knowledge Discovery with FCA

19/67

DATA BIPLOT OF INTERVIEW DATA

Page 25: Knowledge Discovery with FCA

20/67

CONCEPT LATTICE OF INTERVIEW DATA

Page 26: Knowledge Discovery with FCA

21/67

UNFOLDING DATA IN A CONCEPT LATTICETHE BASIC PROCEDURE OF FORMAL CONCEPT ANALYSIS:

� Data is represented in a very basic data type, called formalcontext.

� Each formal context is transformed into a mathematicalstructure called concept lattice. The information containedin the formal context is preserved.

� The concept lattice is the basis for further data analysis. Itmay be represented graphically to supportcommunication, or it may be investigated with withalgebraic methods to unravel its structure.

Page 27: Knowledge Discovery with FCA

22/67

WHAT IS A CONCEPT LATTICE?

� Graphical diagram� Is it a graph? Yes/No?

� Order diagram?� What is an order?� What is a lattice?

Page 28: Knowledge Discovery with FCA

22/67

WHAT IS A CONCEPT LATTICE?

� Graphical diagram� Is it a graph? Yes/No?� Order diagram?� What is an order?

� What is a lattice?

Page 29: Knowledge Discovery with FCA

22/67

WHAT IS A CONCEPT LATTICE?

� Graphical diagram� Is it a graph? Yes/No?� Order diagram?� What is an order?� What is a lattice?

Page 30: Knowledge Discovery with FCA

23/67

MORE EXAMPLESDIVISOR LATTICE OF 200

Page 31: Knowledge Discovery with FCA

24/67

MORE EXAMPLESRECOMMENDED SERVING TEMPERATURE FOR RED WINES

Page 32: Knowledge Discovery with FCA

25/67

MORE EXAMPLESRECOMMENDED SERVING TEMPERATURE FOR WHITE WINES

Page 33: Knowledge Discovery with FCA

26/67

HOW DO WE COMPUTE CONCEPTS?For the mathematical definition of formal concepts weintroduce the derivation operator ′.

For a set of objects A ⊆ G, A′ is defined as:

A′ = {all attributes in M common to the objects of A}.

For a set of attributes B ⊆M, B′ is defined as:

B′ = {objects in G having all attributes of B}.

� We are looking for pairs (A,B) of objects A and attributes Bthat satisfy the conditions

A′ = B and B′ = A

and we call these pairs formal concepts.

Page 34: Knowledge Discovery with FCA

27/67

DERIVATION OPERATORS

Page 35: Knowledge Discovery with FCA

28/67

Page 36: Knowledge Discovery with FCA

29/67

Page 37: Knowledge Discovery with FCA

30/67

Page 38: Knowledge Discovery with FCA

31/67

Page 39: Knowledge Discovery with FCA

32/67

Page 40: Knowledge Discovery with FCA

33/67

Page 41: Knowledge Discovery with FCA

34/67

Page 42: Knowledge Discovery with FCA

35/67

Page 43: Knowledge Discovery with FCA

36/67

Page 44: Knowledge Discovery with FCA

37/67

Page 45: Knowledge Discovery with FCA

38/67

Page 46: Knowledge Discovery with FCA

39/67

Page 47: Knowledge Discovery with FCA

40/67

Page 48: Knowledge Discovery with FCA

41/67

COMPUTING ALL CONCEPTS

There are several algorithms to compute all concepts:� naive approach� intersection method� Next-Closure (Ganter 1984)� Titanic (Stumme et al. 2001)� Inclose family� and several incremental algorithms

Page 49: Knowledge Discovery with FCA

42/67

Page 50: Knowledge Discovery with FCA

43/67

Page 51: Knowledge Discovery with FCA

44/67

Page 52: Knowledge Discovery with FCA

45/67

Page 53: Knowledge Discovery with FCA

46/67

Page 54: Knowledge Discovery with FCA

47/67

Page 55: Knowledge Discovery with FCA

48/67

Page 56: Knowledge Discovery with FCA

49/67

Page 57: Knowledge Discovery with FCA

50/67

Page 58: Knowledge Discovery with FCA

51/67

Page 59: Knowledge Discovery with FCA

52/67

Page 60: Knowledge Discovery with FCA

53/67

Page 61: Knowledge Discovery with FCA

54/67

Page 62: Knowledge Discovery with FCA

55/67

Page 63: Knowledge Discovery with FCA

56/67

Page 64: Knowledge Discovery with FCA

57/67

Page 65: Knowledge Discovery with FCA

58/67

Page 66: Knowledge Discovery with FCA

59/67

Page 67: Knowledge Discovery with FCA

60/67

Page 68: Knowledge Discovery with FCA

61/67

Page 69: Knowledge Discovery with FCA

62/67

Page 70: Knowledge Discovery with FCA

63/67

Page 71: Knowledge Discovery with FCA

64/67

Page 72: Knowledge Discovery with FCA

65/67

Page 73: Knowledge Discovery with FCA

66/67

Page 74: Knowledge Discovery with FCA

67/67