All Projects → DataSystemsLab → Recdb Postgresql

DataSystemsLab / Recdb Postgresql

RecDB is a recommendation engine built entirely inside PostgreSQL

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Recdb Postgresql

retailbox
🛍️RetailBox - eCommerce Recommender System using Machine Learning
Stars: ✭ 32 (-89.23%)
Mutual labels:  recommendation-system, recommendation-engine, recommender-system
Movie Recommender System
Basic Movie Recommendation Web Application using user-item collaborative filtering.
Stars: ✭ 85 (-71.38%)
Mutual labels:  recommender-system, recommendation-system, recommendation-engine
recommender system with Python
recommender system tutorial with Python
Stars: ✭ 106 (-64.31%)
Mutual labels:  recommendation-system, recommendation-engine, recommender-system
recommender
NReco Recommender is a .NET port of Apache Mahout CF java engine (standalone, non-Hadoop version)
Stars: ✭ 35 (-88.22%)
Mutual labels:  recommendation-system, recommendation-engine, recommender-system
Cornac
A Comparative Framework for Multimodal Recommender Systems
Stars: ✭ 308 (+3.7%)
Mutual labels:  recommender-system, recommendation-system, recommendation-engine
Chameleon recsys
Source code of CHAMELEON - A Deep Learning Meta-Architecture for News Recommender Systems
Stars: ✭ 202 (-31.99%)
Mutual labels:  recommender-system, recommendation-system, recommendation-engine
raptor
A lightweight product recommendation system (Item Based Collaborative Filtering) developed in Haskell.
Stars: ✭ 34 (-88.55%)
Mutual labels:  recommendation-system, recommendation-engine
Machine-Learning
Examples of all Machine Learning Algorithm in Apache Spark
Stars: ✭ 15 (-94.95%)
Mutual labels:  recommendation-system, recommendation-engine
GNN-Recommender-Systems
An index of recommendation algorithms that are based on Graph Neural Networks.
Stars: ✭ 505 (+70.03%)
Mutual labels:  recommendation-system, recommender-system
auction-website
🏷️ An e-commerce marketplace template. An online auction and shopping website for buying and selling a wide variety of goods and services worldwide.
Stars: ✭ 44 (-85.19%)
Mutual labels:  recommendation-system, recommender-system
Disco
Recommendations for Ruby and Rails using collaborative filtering
Stars: ✭ 207 (-30.3%)
Mutual labels:  recommender-system, recommendation-engine
NVTabular
NVTabular is a feature engineering and preprocessing library for tabular data designed to quickly and easily manipulate terabyte scale datasets used to train deep learning based recommender systems.
Stars: ✭ 797 (+168.35%)
Mutual labels:  recommendation-system, recommender-system
mildnet
Visual Similarity research at Fynd. Contains code to reproduce 2 of our research papers.
Stars: ✭ 76 (-74.41%)
Mutual labels:  recommendation-system, recommender-system
laracombee
📊 A Recombee integration for Laravel
Stars: ✭ 91 (-69.36%)
Mutual labels:  recommendation-system, recommendation-engine
MachineLearning
Machine learning for beginner(Data Science enthusiast)
Stars: ✭ 104 (-64.98%)
Mutual labels:  recommendation-system, recommendation-engine
Recommendersystem Dataset
This repository contains some datasets that I have collected in Recommender Systems.
Stars: ✭ 249 (-16.16%)
Mutual labels:  recommender-system, recommendation-system
Context-Aware-Recommender
Hybrid Recommender System
Stars: ✭ 16 (-94.61%)
Mutual labels:  recommendation-system, recommender-system
TIFUKNN
kNN-based next-basket recommendation
Stars: ✭ 38 (-87.21%)
Mutual labels:  recommendation-system, recommender-system
Deep-Learning-Model-for-Hybrid-Recommendation-Engine
A Hybrid recommendation engine built on deep learning architecture, which has the potential to combine content-based and collaborative filtering recommendation mechanisms using a deep learning supervisor
Stars: ✭ 19 (-93.6%)
Mutual labels:  recommendation-system, recommendation-engine
Graph Networks
A list of interesting graph neural networks (GNN) links with a primary interest in recommendations and tensorflow that is continually updated and refined
Stars: ✭ 192 (-35.35%)
Mutual labels:  recommender-system, recommendation-system

Welcome to RecDB

RecDB is 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.

RecDB Logo current version: v1.1

How to Get Source Code

You can check out the code, as follows:

$ git clone https://github.com/Sarwat/recdb-postgresql.git

Recommended Machine Specifications

RecDB is designed to be run on a Unix operating system. At least 1GB of RAM is recommended for most queries, though when working with very large data sets more RAM may be desirable, especially when you are not working with apriori (materialized) recommenders.

Building and Installation

Once you've synced with GitHub, the folder should contain the source code for PostgreSQL, as well as several Perl scripts in a directory named "./PostgreSQL/scripts/". If you are familiar with installing PostgreSQL from source, RecDB is installed the exact same way; for the sake of simplicity, however, we have included these scripts that will simplify the process. Note that the installation and remake-related scripts MUST be run from within the PostgreSQL folder in order for them to work correctly.

  1. Run the installation script install.pl.
perl scripts/install.pl [abs_path]

[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.

  1. Run the database server script pgbackend.pl.
perl scripts/pgbackend.pl

The install.pl script stores the install path in a separate file, so there shouldn't be any need to specify it.

  1. In a second terminal, run the database interaction script pgfrontend.pl.
perl scripts/pgfrontend.pl [db_name] [server_host]

[db_name] is the name of the database that you intend to use. [server_host] is the address of the host server running the PostgreSQL backend. If this option is not specified, the script assumes it to be "localhost".


If you need to rebuild PostgreSQL, there are two options.

If you have not modified the grammar, you can do a quick rebuild with remake.pl.

perl scripts/remake.pl

If you have modified the grammar, you will need to do a longer rebuild with remakefull.pl.

perl scripts/remakefull.pl [abs_path]

[abs_path] is the absolute path to the directory where you want PostgreSQL installed. The directory should exist before running this script.

If you ever want to eliminate the current database , use the clean.pl script.

perl scripts/clean.pl [db_name] [server_host]

How RecDB Works

Loading Data

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:

+-----------------------------+
| userid | itemid | ratingval |
+-----------------------------+

Creating Recommenders

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.

CREATE RECOMMENDER MovieRec ON ml_ratings
USERS FROM userid
ITEMS FROM itemid
EVENTS FROM ratingval
USING ItemCosCF

Currently, the available recommendation algorithms that could be passed to the USING clause are the following:

  • ItemCosCF Item-Item Collaborative Filtering using Cosine Similarity measure.

  • ItemPearCF Item-Item Collaborative Filtering using Pearson Correlation Similarity measure.

  • UserCosCF User-User Collaborative Filtering using Cosine Similarity measure.

  • UserPearCF User-User Collaborative Filtering using Cosine Similarity measure.

  • SVD Simon Funk Singular Value Decomposition.

Similarly, materialized recommenders can be removed with the following command:

DROP RECOMMENDER MovieRec

Note that if you query a materialized recommender, the three columns listed above will be the only ones returned, and attempting to reference any additional columns will result in an error.

Recommendation Query

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:

SELECT * FROM ml_ratings R
RECOMMEND R.itemid TO R.userid ON R.ratingval USING ItemCosCF
WHERE R.userid = 1
ORDER BY R.ratingval
LIMIT 10

When you issue a query such as this, the only interesting data will come from the three columns specified in the RECOMMEND clause. Any other columns that exist in the specified ratings tables will be set to 0.

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.

More Complex Queries

The main benefit of implementing the recommendation functionality inside a database engine (PostgreSQL) is to allow for integration with traditional database operations, e.g., selection, projection, join. For example, the following query recommends the top 10 Comedy movies to user 1. 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%').

SELECT * FROM ml_ratings R, Movies M
RECOMMEND R.itemid TO R.userid ON R.ratingval USING ItemCosCF
WHERE R.userid = 1 AND M.movieid = R.itemid AND M.genre LIKE '%Comedy%'
ORDER BY R.ratingval
LIMIT 10

Publications

Authors

Support or Contact

Having trouble with RecDB? contact [email protected] and we’ll help you sort it out.

Follow @Rec_DB on Twitter for updates

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].