Git Product home page Git Product logo

datasystemslab / recdb-postgresql Goto Github PK

View Code? Open in Web Editor NEW
362.0 27.0 43.0 108.34 MB

RecDB is a recommendation engine built entirely inside PostgreSQL

Makefile 0.88% Shell 0.32% C 89.14% C++ 2.62% Perl 0.87% XSLT 0.05% CSS 0.01% Assembly 0.01% Python 0.02% SQLPL 0.38% PLpgSQL 3.19% DTrace 0.01% XS 0.03% HTML 0.07% Batchfile 0.02% Yacc 1.58% Lex 0.53% M4 0.18% Objective-C 0.12% Csound Score 0.01%
recommendation-algorithms database recommendation-engine recommender-system recommendation recommendation-system machine-learning

recdb-postgresql's People

Contributors

anurag-akajeetu avatar rmoraffah avatar thesounddefense avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

recdb-postgresql's Issues

Column name not recognized by materialized recommender

After recommender materialization a (previously working) recommendation query does not work anymore.

How to reproduce the problem:
0) load the movie dataset

  1. verify that the query works
  2. materialize the recommender
  3. verify that the query fails
  4. drop the recommender
  5. verify that the query works

Here is the complete list of SQL statements (except point 0):

CREATE RECOMMENDER MovieRec ON ml_ratings
USERS FROM userid
ITEMS FROM itemid
EVENTS FROM ratingid
USING ItemCosCF;
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;
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;

ERROR: column r.ratingval does not exist at character 62
STATEMENT: 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;

DROP RECOMMENDER MovieRec;
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;

Installation error

I have installed the needed packages using:
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison libxml2-dev libxslt-dev libssl-dev

But when I run the install.pl script I get the following error:

***
ERROR: `flex' is missing on your system. It is needed to create the
file `bootscanner.c'. You can either get flex from a GNU mirror site
or download an official distribution of PostgreSQL, which contains
pre-packaged flex output.
***
make[3]: *** [bootscanner.c] Error 1
make[2]: *** [bootstrap-recursive] Error 2
make[1]: *** [all-backend-recurse] Error 2
make: *** [all-src-recurse] Error 2
Compilation error.

How can I solve this?

RecDB install on existing Postgresql

Dear Sir,

My project have already run (luckily in Postgresql) so migration data to new DB system will be cost inefffective. Do your RecDB engine support directly install on the ordinary database.

Thanks

RecDB query to recommender fails

Hi,

I've created a recommender based off a table I have in the RecDB. My understanding is that when I run a recommending query after creating a recommender, RecDB automatically sees a created recommender and uses it for a faster response.

However, after creating a recommender and running a recommend query, I get the following error server side

select * from relations recommend anime_id to user_id on score using ItemCosCF where user_id = 499231 order by score desc limit 20;
LOG:  server process (PID 17044) was terminated by signal 11: Segmentation fault
DETAIL:  Failed process was running: select * from relations recommend anime_id to user_id on score using ItemCosCF where user_id = 499231 order by score desc limit 20;
LOG:  terminating any other active server processes
WARNING:  terminating connection because of crash of another server process
DETAIL:  The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
HINT:  In a moment you should be able to reconnect to the database and repeat your command.
FATAL:  the database system is in recovery mode
LOG:  all server processes terminated; reinitializing
LOG:  database system was interrupted; last known up at 2016-04-28 03:13:29 UTC
LOG:  database system was not properly shut down; automatic recovery in progress
LOG:  record with zero length at C/2257FB40
LOG:  redo is not required
LOG:  database system is ready to accept connections
LOG:  autovacuum launcher started



Could anyone kindly suggest what the problem might be? Thanks for your time.

RecDB installation on macOS 10.13.6 failed.

Hi,

Just start to install RecDB on my Mac.
But got failed with logs:

Compiling PostgreSQL.
In file included from bootparse.y:27:
In file included from ../../../src/include/bootstrap/bootstrap.h:17:
../../../src/include/nodes/execnodes.h:1494:8: error: expected member name or ';' after declaration specifiers
int ID; /* the user or item ID /
~~~ ^
bootparse.c:107:12: note: expanded from macro 'ID'
#define ID 259
^
In file included from bootparse.y:27:
In file included from ../../../src/include/bootstrap/bootstrap.h:17:
../../../src/include/nodes/execnodes.h:1494:5: error: expected ';' at end of declaration list
int ID; /
the user or item ID */
^
;
2 errors generated.
make[3]: *** [bootparse.o] Error 1
make[2]: *** [bootstrap-recursive] Error 2
make[1]: *** [all-backend-recurse] Error 2
make: *** [all-src-recurse] Error 2

Any help? Got postgresql installed already.

attempting to run RecATHON

Hello,
I am new to programming, and I am attempting to execute RecATHON.
So far, I found startrecathonserver.jar on recdb-postgresql\PostgreSQL\experiments directory.
I have executed it by using java -jar, but I have encountered this error that recathonconfig.properties is missing.
So, I created it without writing a code, and terminal prints as 'Server Listening!' once I executed it again.

I am not sure I am on right track and/or I don't know of next step.
How do I start to run RecATHON?

postgresql extension

building the server from scratch is not an option for me unfortunately, as I want to deploy to a PAAS. Is there any chance to get this API packaged into an extension for psql sometime?

best
Bernd

ERROR: type mismatch in getTupleFloat() when using UserPearCF

Hi, everyone!
Thanks for such an interesting implementation as recdb.

I tried to play with different options and successfully applied item-item recommenders.
But, got this problem using UserPearCF and UserCosCF recommenders

I created a rating table

create table ratings
(
	record_id bigserial not null
		constraint ratings_users_pk
			primary key,
	user_id integer not null,
	story_id integer not null,
	rating integer not null
);

create unique index ratings_record_id_uindex
	on ratings (record_id);

create index ratings_story_id_index
	on ratings (story_id);

create index ratings_user_id_index
	on ratings (user_id);

Then, I created a recommender for this

CREATE RECOMMENDER UserRec ON ratings
USERS FROM user_id
ITEMS FROM story_id
EVENTS FROM rating
USING userpearcf;

Trying to execute a query similar to the example

SELECT R.story_id, R.rating
          FROM ratings R RECOMMEND R.story_id TO R.user_id ON R.rating USING UserPearCF
            WHERE R.user_id = 1000
            ORDER BY R.rating DESC

Got this error:

ERROR:  type mismatch in getTupleFloat()

Linking other algorithms with RecDB

Is there a way that I can use my own implemented algorithm to produce recommendations using RecDB.
I want to link my algo with RecDB so that it can be used in the same way as the built in ones are used.
Please tell me the way to do this.

Should the DB columns be indexed? I noticed none of the example code was.

So, I am trying to experiment on using RecDB to deal with a MASSIVE database with about 170 million entries and have had some rather slow query times, as you can imagine. I was wondering if indexing userID or itemID columns of my database would provide any noticeable speed advantages since none of the examples scripts appeared to create indexes on the DB. Also for a DB of a 170 million reviews what would you expect the runtime for creating the APRIORI recommender? Hours? Days? Weeks?

Any information would be extremely helpful.

Explain Analyze breaks with recommendation

EXPLAIN ANALYZE breaks with a recommendation query. To reproduce the problem, first load the MovieLens dataset and then perform the following queries:

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

Then execute the following:

EXPLAIN ANALYZE SELECT * FROM ml_ratings RECOMMEND itemid TO userid ON ratingval USING itemcoscf WHERE userid = 1 ORDER BY ratingval LIMIT 10;

The back-end ends unexpectedly and returns a segmentation fault.

Note that EXPLAIN alone works just fine.

RecDB is not working with Postgres JDBC Driver

I have noticed that while connecting with Postgres JDBC driver, the system can not recognize Recommend statement. Since connecting to the applications using java is an important part of the DBMS, I think this would be useful to add this feature to RecDB.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.