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
We provide the MovieLens data to build a "Hello-World" movie recommendation application using RecDB. You can load the data using the sql script called "initmovielens1mdatabase.sql" stored in "./PostgreSQL" directory. We provide the dataset at "./PostgreSQL/moviedata / MovieLens1M/" directory. For instance, the ratings table may have a schema as follows:
76
+
We provide the MovieLens data to build a "Hello-World" movie recommendation application using RecDB. You can load the data using the sql script called "initmovielens1mdatabase.sql" stored in "./PostgreSQL" directory. We provide the dataset at "./PostgreSQL/moviedata / MovieLens1M/" directory. For instance, the ratings (i.e., ml_ratings) table may have a schema as follows:
77
77
78
78
```
79
79
+-----------------------------+
@@ -85,7 +85,7 @@ We provide the MovieLens data to build a "Hello-World" movie recommendation appl
85
85
Users may create recommenders apriori so that when a recommendation query is issued may be answer with less latency. The user needs to specify the ratings table in the ON clause and also specify where the user, item, and rating value columns are in that table. Moreover, the user has to designate the recommendation algorithm to be used to predict item ratings in the USING clause.
86
86
87
87
```
88
-
CREATE RECOMMENDER MovieRec ON MovieRatings
88
+
CREATE RECOMMENDER MovieRec ON ml_ratings
89
89
USERS FROM userid
90
90
ITEMS FROM itemid
91
91
EVENTS FROM ratingval
@@ -116,10 +116,10 @@ Note that if you query a materialized recommender, the three columns listed abov
116
116
117
117
118
118
### Recommendation Query
119
-
In the recommendation query, the user needs to specify the ratings table and also specify where the user, item, and rating value columns are in that table. Moreover, the user has to designate the recommendation algorithm to be used to predict item ratings. For example, if MovieRatings(userid,itemid,ratingval) represents the ratings table in a movie recommendation application, then to recommend top-10 movies based on the rating predicted using Item-Item Collaborative filtering (applying cosine similarity measure) algorithm to user 1, the user writes the following SQL:
119
+
In the recommendation query, the user needs to specify the ratings table and also specify where the user, item, and rating value columns are in that table. Moreover, the user has to designate the recommendation algorithm to be used to predict item ratings. For example, if ml_ratings(userid,itemid,ratingval) represents the ratings table in a movie recommendation application, then to recommend top-10 movies based on the rating predicted using Item-Item Collaborative filtering (applying cosine similarity measure) algorithm to user 1, the user writes the following SQL:
120
120
121
121
```
122
-
SELECT * FROM MovieRatings R
122
+
SELECT * FROM ml_ratings R
123
123
RECOMMEND R.itemid TO R.userid ON R.ratingval
124
124
USING ItemCosCF
125
125
WHERE R.userid = 1
@@ -140,7 +140,7 @@ In order to do that, the query joins the recommendation with the Movies table an
140
140
141
141
142
142
```
143
-
SELECT * FROM MovieRatings R, Movies M
143
+
SELECT * FROM ml_ratings R, Movies M
144
144
RECOMMEND R.itemid TO R.userid ON R.ratingval
145
145
USING ItemCosCF
146
146
WHERE R.userid = 1 AND M.movieid = R.itemid AND M.genre LIKE '%Comedy%'
0 commit comments