Skip to content

Commit 2679470

Browse files
adds reference to README, fixes typos
1 parent e497231 commit 2679470

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ For further insights on enhancing RAG applications with dense content representa
9999
| Recipe | Description |
100100
| --- | --- |
101101
| [/recommendation-systems/content_filtering.ipynb](python-recipes/recommendation-systems/content_filtering.ipynb) | Intro content filtering example with redisvl |
102+
| [/recommendation-systems/collaborative_filtering.ipynb](python-recipes/recommendation-systems/collaborative_filtering.ipynb) | Intro collaborative filtering example with redisvl |
102103

103104
### See also
104105
An exciting example of how Redis can power production-ready systems is highlighted in our collaboration with [NVIDIA](https://developer.nvidia.com/blog/offline-to-online-feature-storage-for-real-time-recommendation-systems-with-nvidia-merlin/) to construct a state-of-the-art recommendation system.

python-recipes/recommendation-systems/collaborative_filtering.ipynb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"source": [
1818
"Recommendation systems are a common application of machine learning and serve many industries from e-commerce to music streaming platforms.\n",
1919
"\n",
20-
"There are many different architechtures that can be followed to build a recommendation system.\n",
20+
"There are many different architectures that can be followed to build a recommendation system. In a previous example notebook we demonstrated how to do [content filtering with RedisVL](content_filtering.ipynb). We encourage you to start there before diving into this notebook.\n",
2121
"\n",
2222
"In this notebook we'll demonstrate how to build a [collaborative filtering](https://en.wikipedia.org/wiki/Collaborative_filtering)\n",
2323
"recommendation system and use the large IMDB movies dataset as our example data.\n",
@@ -268,7 +268,7 @@
268268
}
269269
],
270270
"source": [
271-
"# surprise casts userId and movieId to inner ids, so we have to use their mapping to now which rows to use\n",
271+
"# surprise casts userId and movieId to inner ids, so we have to use their mapping to know which rows to use\n",
272272
"inner_uid = train_set.to_inner_uid(347) # userId\n",
273273
"inner_iid = train_set.to_inner_iid(5515) # movieId\n",
274274
"\n",
@@ -582,8 +582,8 @@
582582
"movies_df['overview'] = movies_df['overview'].fillna('')\n",
583583
"movies_df['popularity'] = movies_df['popularity'].fillna(0)\n",
584584
"movies_df['release_date'] = movies_df['release_date'].fillna('1900-01-01').apply(lambda x: datetime.datetime.strptime(x, \"%Y-%m-%d\").timestamp())\n",
585-
"movies_df['revenue'] = movies_df['revenue'].fillna(0) # fill with average?\n",
586-
"movies_df['runtime'] = movies_df['runtime'].fillna(0) # fill with average?\n",
585+
"movies_df['revenue'] = movies_df['revenue'].fillna(0)\n",
586+
"movies_df['runtime'] = movies_df['runtime'].fillna(0)\n",
587587
"movies_df['status'] = movies_df['status'].fillna('unknown')\n",
588588
"movies_df['tagline'] = movies_df['tagline'].fillna('')\n",
589589
"movies_df['title'] = movies_df['title'].fillna('')\n",
@@ -1196,7 +1196,7 @@
11961196
"## Adding All the Bells & Whistles\n",
11971197
"Vector search handles the bulk of our collaborative filtering recommendation system and is a great approach to generating personalized recommendations that are unique to each user.\n",
11981198
"\n",
1199-
"To up our RecSys game even further we can leverage RedisVl filter logic to give more control to what users are shown. Why have only one feed of recommended movies when you can have several, each with its own theme and personalized to each user."
1199+
"To up our RecSys game even further we can leverage RedisVL Filter logic to give more control to what users are shown. Why have only one feed of recommended movies when you can have several, each with its own theme and personalized to each user."
12001200
]
12011201
},
12021202
{
@@ -1428,7 +1428,7 @@
14281428
"metadata": {},
14291429
"source": [
14301430
"## Keeping Things Fresh\n",
1431-
"You've probably noticed that a few movies get repeated in these lists. That's not surprising as all our results are personalized and things like `popularity` and `user_rating` and `revenue` are likely highly correlated. And it's more that likely that at least some of the recommendations we're expecting to be highly rated by a given user are ones they've already watched and rated highly.\n",
1431+
"You've probably noticed that a few movies get repeated in these lists. That's not surprising as all our results are personalized and things like `popularity` and `user_rating` and `revenue` are likely highly correlated. And it's more than likely that at least some of the recommendations we're expecting to be highly rated by a given user are ones they've already watched and rated highly.\n",
14321432
"\n",
14331433
"Luckily Redis offers an easy answer to keeping recommendations new and interesting, and that answer is Bloom Filters."
14341434
]

0 commit comments

Comments
 (0)