Mathematics of Incidence (part 4): Lattice dependencies

Post on 01-Jul-2015

148 views 1 download

description

Motivated by a simple example of collaborative filtering from previous presentations, we look at what it means to be dependent and independent in formal concept analysis, and what the limitations are for deciding how "strong" a dependency might be. Along the way, we catch a glimmer of how association rules arise from the concept lattice, and get a hint that we might need some information theory.

Transcript of Mathematics of Incidence (part 4): Lattice dependencies

Mathematics of Incidencepart 4: Lattice dependencies

Benjamin J. Kellerbjkeller.github.iolinkedin.com/in/bjkeller

v.1.1, 7 November 2014

Creative Commons Attribution-ShareAlike 4.0 International License

ma1 a2 a3

g1

g2 g3 g4

g5 g6 g7

g8 g9 g10

a u1 u2 uk

s1s2sr(a) tsl

un(a)

� �

Recall: CF and dependency

• Recommend t to a by composing formal concepts for selection of users {ui } and items { si }

• Correspond to filter and ideal that capture dependencies

• Intuition: good recommendation determined by “strong” dependency

• [note: ideal and filter are dual, so good enough to define for one b/c other will be same]

Independence in concept lattice

apples doughnuts

Abby XDavid X

doughnutsapples

DavidAbby

no shared objects/attributes

Definition: anti-chain

doughnutsapples

DavidAbby

An anti-chain in lattice is a subset of elementsL S ⇢ L

p, q 2 S p 6 q q 6 pwhere for all both and

Dependenciesapples

Abby XBrian X

apples

Abby, Brian

apples cherries

Abby XBrian X X

apples

Abby

cherries

Brian

apples cherries grapes

Abby X XBrian X X

apples

grapes

Abby

cherries

Brian

Definition: chain

A chain in lattice is a subset of elementsL S ⇢ L

p, q 2 Swhere for all either orp q q p

apples

Abby

cherries

Brian

apples

grapes

Abby

cherries

Brian

bananas

doughnutsapples

eggscherries

Charles

DavidBrian

Abby

Definition: join and meet

For lattice elements p, q 2 L

the join of and is the least elementp q p _ q 2 L

p p _ q q p _ qsatisfying both and

the meet of p ^ q 2 Land is the greatest elementp q

p ^ q p p ^ q qsatisfying both and

(In)dependence

apples

grapes

Abby

cherries

Brian

�(Abby) _ �(Brian)

µ(grapes) ^ µ(cherries)

(dependent)

(independent)

Is there a shared object/attribute?

Strong Dependency

• Not clear what "strong" means

• Intuitively, Abby and Brian would have a "stronger" dependency if they shared "enough" common likes

• What does lattice look like if we add more common likes?

apples

grapes

Abby

cherries

Brian

Strong Dependency

• Adding common likes just increases number of items labeling top of lattice

• Lattice structure doesn't change

• These attributes are redundant from the perspective of constructing the lattice

applesbananas

doughnutseggs

flautas

grapes

Abby

cherriesBrian

Repeating is redundant

apples

Abby

apples

Abby, Brian

apples

Abby, Brian,Charles

apples

Abby XBrian X

apples

Abby XBrian XCharles X

apples

Abby X

apples cherries

Abby XBrian X X

apples bananas cherries

Abby X XBrian X X X

apples,bananas

Abby

cherries

Brian

apples

Abby

cherries

Brian

cherries

Abby

Brian X

Abby

cherries

Brian

Strong Dependency

• FCA is the wrong math to define strength of dependency

• Concept lattice only tells us independent or not

• Can construct a minimal (reduced) context that maintains lattice structure without redundancies

• "Strength" basically means mutually informative

• Information constrained by lattice structure, but determined by counts

• [Topic for a different set of slides…]

Attribute implications

A ! B A,B ✓ MDefine implication forµA � µBwhenever

Rules defined this way capture same relationships as lattice – some trivial, some more interesting

Can be read as “every object with attributes in A, also has attributes in B”

apples bananas cherries

Abby XBrian X XCharles X X X

apples

Abby

bananas

Charles

cherries

Brian

cherries ! cherries

cherries ! bananas

cherries ! apples

bananas ! bananas

bananas ! apples

apples ! apples

cherries, bananas ! apples

m a1 a2 a3

g1

g2 g3 g4 g5

m a1 a2 a3

g1 X X X Xg2 X X Xg3 X X Xg4 X X Xg5 X X X

A = {a1, a2, a3}

B ! ai

B [m ! m

Let

then have implications

for

B ✓ Afor

ai 2 B ✓ A

m a1 a2 a3

g1 X X X Xg2 X X Xg3 X X Xg4 X X X

ai, aj 2 A, i 6= j

aj ! aj

ai, aj ! aj

m ! m

aj ,m ! m

ai, aj ,m ! m

a1, a2, a3 ! m

A = {a1, a2, a3}Let

then have implications

but also have

m

g1

g2 g3 g4

m a1 a2 a3

g1 X X X Xg2 X X Xg3 X X Xg4 X X Xg5 Xg6 Xg7 Xg8 X Xg9 X Xg10 X X

m a1 a2 a3

g1

g2 g3 g4

g5 g6g7

g8 g9 g10

Yields the same implications including

a1, a2, a3 ! m

Flavors of implicationsImplication is

bananas , cherries ! bananas

cherries ! bananas

A ! B

B ✓ A

B 6✓ A

A,B ✓ Mfor where either

read as people who like bananas and something else, like bananas

read as people who like cherries like bananas

First is boring, second corresponds to association rules

Pointer: Association Rules

A,B ✓ MA ) BAn association rule is a pair of setsB 6= ; A \B = ;such that and

| A [ B|| B|

Evaluated in terms of confidence:

FCA used for frequent item set mining to find association rules

Defintion: Interval

Let be a poset, then the interval foris

(P,) p, q 2 P

[p, q] = {r 2 P | p r q}

[ponder: how would you write a principal filter or ideal as an interval?]

Intervals and implicationsa1, a2, a3 ! mThe implication corresponds to

[µ{a1, a2, a3}, µm] whereµ{a1, a2, a3} = µ{a1, a2, a3,m}interval

m a1 a2 a3

g1

g2 g3 g4

Abby and those pesky doughnuts

bananas

doughnutsapples

eggscherries

Charles

DavidBrian

Abby

cherries ! apples

apples ! bananas

doughnuts ! bananas

cherries ! doughnuts

eggs ! doughnuts

A minimal set of implications

Shorter chains seem better, but are these rules enough to say what is a good recommendation?

Questions to ponder

• What information does a formal concept carry? Can we use a measure of it to define strong dependency?

• How does strength of dependency relate to implications?

• We can recommend doughnuts and cherries to Abby, but which first?

Corrections

11.7.14: had drawn lattice on slide 16 incorrectly

About me and these slides

I am Ben(jamin) Keller. I learn and, sometimes, create through explaining. I had been involved in a big (US) federally funded project that had the goal of helping biomedical scientists tell stories about their experimental observations. The project is long gone, but I’m still trying to grok how such a thing would work. Much of biological data comes in the form of observations that are distilled to something that looks like an incidence relation, which brings us to this series of presentations. My goal for the slides is to deal with the mathematics and analysis of incidence in an approachable way, but the intuitive beginnings will eventually allow us to embrace the more complex later.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0

International License.