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.txt
+12-7Lines changed: 12 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -20,17 +20,17 @@ Once you've synced with GitHub, the folder should contain the source code for Po
20
20
perl install.pl [abs_path]
21
21
```
22
22
23
-
[abs_path] is the absolute path to the directory where you want PostgreSQL installed. The directory should exist before running this script.
23
+
[abs_path] is the absolute path to the directory where you want PostgreSQL installed. The directory should exist before running this script. This will also create a folder "data" in the PostgreSQL folder; this is where the database will be located.
24
24
25
-
2. Run the database server script pgstart.pl.
25
+
2. Run the database server script pgbackend.pl.
26
26
27
27
```
28
28
perl pgbackend.pl
29
29
```
30
30
31
-
The install.pl script stores the install path, so there shouldn't be any need to specify it.
31
+
The install.pl script stores the install path in a separate file, so there shouldn't be any need to specify it.
32
32
33
-
3. In a second terminal, run the database interaction script dbstart.pl.
33
+
3. In a second terminal, run the database interaction script pgfrontend.pl.
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.
69
69
70
70
### Recommendation Query
71
-
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 the rating prediceted using Item-Item Collaborative filtering (applying cosine similarity measure) algorithm to user 1, the user writes the following SQL:
71
+
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:
72
72
73
73
```
74
74
SELECT * FROM MovieRatings R
@@ -79,18 +79,23 @@ OREDER BY R.ratingval
79
79
LIMIT 10
80
80
```
81
81
82
+
The available methods are ItemCosCF, ItemPearCF, UserCosCF, UserPearCF, and SVD. Note that if you do not specify which user(s) you want recommendations for, it will generate recommendations for all users, which can take an extremely long time to finish.
83
+
82
84
### Materializing Recommenders
83
85
Users may create recommenders apriori so that when a recommendation query is issued may be answer with less latency.
84
86
85
87
```
86
-
CREATE RECOMMENDER ON MovieRatings
88
+
CREATE RECOMMENDER MovieRec ON MovieRatings
87
89
USERS FROM userid
88
90
ITEMS FROM itemsid
89
91
EVENTS FROM ratingid
90
92
USING ItemCosCF
91
-
92
93
```
94
+
Similarly, materialized recommenders can be removed with the following command:
93
95
96
+
```
97
+
DROP RECOMMENDER MovieRec
98
+
```
94
99
95
100
### Support or Contact
96
101
Having trouble with RecDB ? contact sarwat@cs.umn.edu and we’ll help you sort it out.
0 commit comments