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.md
+31-2Lines changed: 31 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
### Welcome to RecDB.
1
+
# Welcome to RecDB.
2
2
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:
3
3
4
4
```
@@ -79,7 +79,19 @@ ORDER 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.
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.
83
95
84
96
### Materializing Recommenders
85
97
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:
97
109
DROP RECOMMENDER MovieRec
98
110
```
99
111
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
+
100
129
### Support or Contact
101
130
Having trouble with RecDB ? contact [email protected] and we’ll help you sort it out.
0 commit comments