Skip to content

Commit 2cd3165

Browse files
committed
update README
1 parent 747a0b5 commit 2cd3165

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ A simple recommendation engine has four parts:
1313
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.
1414

1515
## 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.
1717

1818
### 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.*
20+
E.g. `[1,2,3] n [1,3,4] -> [1,3]`
21+
![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/99/Venn0001.svg/440px-Venn0001.svg.png)
2122

22-
**intersection**: *the set comprised of items that appear in only one of the input sets.*
23-
E.g. `[1,2,3] n [1,3,5] -> [2,5]`
23+
**symmetric difference**: *the set comprised of items that appear in only one of the input sets.*
24+
E.g. `[1,2,3] ∆ [1,3,5] -> [2,5]`
25+
![](https://upload.wikimedia.org/wikipedia/commons/thumb/4/46/Venn0110.svg/440px-Venn0110.svg.png)
2426

2527
### Similarity
2628
**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`
2830

2931
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).
3032

0 commit comments

Comments
 (0)