Skip to content

Commit 105f6f3

Browse files
author
Jim Avery
committed
2 parents c1a996b + c7b7a6c commit 105f6f3

File tree

2 files changed

+34
-4
lines changed

2 files changed

+34
-4
lines changed

PostgreSQL/COPYRIGHT

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
PostgreSQL Database Management System
2-
(formerly known as Postgres, then as Postgres95)
1+
RecDB: A Recommendation Engine Built Entirely Inside PostgreSQL 9.2
2+
3+
Portions Copyright (c) 2013, Data Management Lab University of Minnesota
34

45
Portions Copyright (c) 1996-2012, PostgreSQL Global Development Group
56

README.txt renamed to README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Welcome to RecDB.
1+
# Welcome to RecDB.
22
An Open Source Recommendation Engine Built Entirely Inside PostgreSQL 9.2. RecDB allows application developers to build recommendation applications in a heartbeat through a wide variety of built-in recommendation algorithms like user-user collaborative filtering, item-item collaborative filtering, singular value decomposition. Applications powered by RecDB can produce online and flexible personalized recommendations to end-users. You can check out the code, as follows:
33

44
```
@@ -79,7 +79,19 @@ ORDER BY R.ratingval
7979
LIMIT 10
8080
```
8181

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.
82+
Currently, the available recommendation algorithms that could be passed to the USING clause are the following:
83+
84+
ItemCosCF: Item-Item Collaborative Filtering using Cosine Similarity measure.
85+
86+
ItemPearCF: Item-Item Collaborative Filtering using Pearson Correlation Similarity measure.
87+
88+
UserCosCF: User-User Collaborative Filtering using Cosine Similarity measure.
89+
90+
UserPearCF: User-User Collaborative Filtering using Cosine Similarity measure.
91+
92+
SVD: Simon Funk Singular Value Decomposition.
93+
94+
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.
8395

8496
### Materializing Recommenders
8597
Users may create recommenders apriori so that when a recommendation query is issued may be answer with less latency.
@@ -97,5 +109,22 @@ Similarly, materialized recommenders can be removed with the following command:
97109
DROP RECOMMENDER MovieRec
98110
```
99111

112+
### More Complex Queries
113+
The main benefit of implementing the recommendation functionality inside a database enine (PostgreSQL) is to allow for integration with traditional database operations, e.g., selection, projection, join.
114+
For example, the following query recommends the top 10 Comedy movies to user 1.
115+
In order to do that, the query joins the recommendation with the Movies table and apply a filter on the movies genre column (genre LIKE '%Comedy%').
116+
117+
118+
```
119+
SELECT * FROM MovieRatings R, Movies M
120+
RECOMMEND R.itemid TO R.userid ON R.ratingval
121+
USING ItemCosCF
122+
WHERE R.userid = 1 AND M.movieid = R.itemid AND M.genre LIKE '%Comedy%'
123+
ORDER BY R.ratingval
124+
LIMIT 10
125+
```
126+
127+
128+
100129
### Support or Contact
101130
Having trouble with RecDB ? contact [email protected] and we’ll help you sort it out.

0 commit comments

Comments
 (0)