You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,18 +13,20 @@ A simple recommendation engine has four parts:
13
13
Our program is based on the **assumption** that users have similar preferences, i.e. one user liking an item means similar users will probably like that item too.
14
14
15
15
## Concepts
16
-
To determine which users are similar, it's helpful to think about the union and intersection of preference sets.
16
+
To determine which users are similar, it's helpful to think about the intersection and symmetric difference of preference sets.
17
17
18
18
### Sets
19
-
**union**: *the set comprised of items that appear in both input sets.*
20
-
E.g. `[1,2,3] u [1,3,4] -> [1,3]`
19
+
**intersection**: *the set comprised of items that appear in both input sets.*
**Similarity**: *A user is similar if they have more in common than not.*
27
-
We can represent this by looking at the number of elements in the union of two users' preferences over the total items those users have rated, or `A u B / A + B`
29
+
We can represent this by looking at the number of elements in the intersection of two users' preferences over the total items those users have rated, or `A n B / A u B`
28
30
29
31
A more advanced concept is that users who disagree about an item (e.g. a likes 1, b *dis*likes 1) are more dissimilar than those who do not (e.g. a likes 1, b likes 2).
0 commit comments