Mathematics of Incidence, part 1: Getting Started with Collaborative Filtering
-
Upload
benjamin-keller -
Category
Data & Analytics
-
view
171 -
download
0
description
Transcript of Mathematics of Incidence, part 1: Getting Started with Collaborative Filtering
Mathematics of Incidencepart 1: Getting started through Collaborative Filtering !Benjamin J. Kellerbjkeller.github.io!v.1, 26 September 2014
Creative Commons Attribution-ShareAlike 4.0 International License
a
u1u2
⋮
s1s2
uksl
⋮
t
Collaborative Filtering
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
Use likes of users to recommend foods to Abby
Recommend these three foods to Abby because she likes food in common with users who like them
Likes represented as bipartite graph
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
bipartite graph (U,V,E) has vertices in disjoint sets U and V with edges (u,v) in E from vertex u in U to vertex v in V
Constructing a recommendationConstruct a recommendation by following edges in graph:
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Constructing a recommendationConstruct a recommendation by following edges in graph:
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Constructing a recommendationConstruct a recommendation by following edges in graph:
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Constructing a recommendationConstruct a recommendation by following edges in graph:
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Constructing a recommendationConstruct a recommendation by following edges in graph:
Abby Charles
David
cherries
doughnuts
eggs
apples
bananas
Brian
Biclique – a special subgraph
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
A biclique (U,V,E) of a bipartite graph G is a subgraph of G such that each u in U has an edge (u,v) with each v in V
Constructing a biclique 1.1
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Start with vertices for Brian and Charles
Constructing a biclique 1.2
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Find all foods liked by Brian and Charles
Constructing a biclique 2.1
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Start with vertices for all foods liked by Brian and Charles
Constructing a biclique 2.2
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Find all users who like same foods as Brian and Charles
Biclique
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Try another…
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Start with vertex for David
Which one?Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
hint: must be a biclique, and should include all users who like everything David likes
All Bicliques
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Recommendations via bicliques
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Construct same recommendation by composing bicliques
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Recommendations via bicliques
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Construct same recommendation by composing bicliques
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby Charles
David
cherries
doughnuts
eggs
apples
bananas
Brian
All recommendations
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
Abby Charles
David
cherries
doughnuts
eggs
apples
bananas
Brian
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Notice something about these bicliques
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Users of first are superset of second
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Foods of first are subset of second
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Ordering bicliques by usersAbby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
⊇
≥
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Ordering bicliques by foods
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
⊆
≥
both are equivalent
Biclique order
Transitive: if a ≤ b and b ≤ c then a ≤ c
Antisymmetric: if a ≤ b and b ≤ a then a = b
Reflexive: a ≤ a, for all bicliques a
Inherits properties from subset order on sets:
called a partial order
Covering relationship
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
second biclique covers the first because there is no biclique greater than first that is less than second (e.g., there is no b such that a < b < c)
≺
Drawing ordering
Hasse diagram
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
≺
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
If have
then draw
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
We saw that
Abby Charles
David
cherries
doughnuts
eggs
apples
bananas
Brian
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
involves related bicliques
but, what about others?
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
order is transitive
Abby
Brian
Charles
David
cherries
doughnuts
eggs
apples
bananas
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Anecdotally, can construct recommendation from biclique A and B where A > B
It has to be – a "proof"a
u1u2
⋮
s1
s2
uk
sl
⋮
ta
u1u2
⋮
s1
s2
uk
sl
⋮
u1u2
⋮
s1
s2
uk
sl
⋮
t
Can recommend food t to user a because there are foods s1,s2,…,sl liked by user a and users u1,u2,…,uk who also like food t
Means that there must be a biclique A involving at least users a and u1,u2,…,uk and exactly foods s1,s2,…,sl
And, there is also a biclique B involving exactly users u1,u2,…,uk and at least foods s1,s2,…,sl and t
As user set of A is a superset of the users of B, it must be that A > B
Questions to ponder
• What is a "good" recommendation?
• Serendipity, who?
• And, what's the deal with Abby and doughnuts, anyway?
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
Abby
Brian
Charles
David
apples
bananas
cherries
doughnuts
eggs
every biclique
above has Abby
every biclique below has doughnuts
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 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.